Module: Commons::Logging::Log
- Included in:
- Impl::Log4rLogger, Impl::NoOpLog, Impl::SimpleLog
- Defined in:
- lib/commons/logging/log.rb
Constant Summary collapse
- TRACE =
:TRACE
- DEBUG =
:DEBUG
- INFO =
:INFO
- WARN =
:WARN
- ERROR =
:ERROR
- FATAL =
:FATAL
Instance Method Summary collapse
- #debug(message, exception = nil) ⇒ Object
- #debug? ⇒ Boolean
- #error(message, exception = nil) ⇒ Object
- #error? ⇒ Boolean
- #fatal(message, exception = nil) ⇒ Object
- #fatal? ⇒ Boolean
- #info(message, exception = nil) ⇒ Object
- #info? ⇒ Boolean
- #trace(message, exception = nil) ⇒ Object
- #trace? ⇒ Boolean
- #warn(message, exception = nil) ⇒ Object
- #warn? ⇒ Boolean
Instance Method Details
#debug(message, exception = nil) ⇒ Object
50 51 52 |
# File 'lib/commons/logging/log.rb', line 50 def debug(, exception = nil) log(DEBUG, , exception) end |
#debug? ⇒ Boolean
80 81 82 |
# File 'lib/commons/logging/log.rb', line 80 def debug? return enabled_for?(DEBUG) end |
#error(message, exception = nil) ⇒ Object
65 66 67 |
# File 'lib/commons/logging/log.rb', line 65 def error(, exception = nil) log(ERROR, , exception) end |
#error? ⇒ Boolean
95 96 97 |
# File 'lib/commons/logging/log.rb', line 95 def error? return enabled_for?(ERROR) end |
#fatal(message, exception = nil) ⇒ Object
70 71 72 |
# File 'lib/commons/logging/log.rb', line 70 def fatal(, exception = nil) log(FATAL, , exception) end |
#fatal? ⇒ Boolean
100 101 102 |
# File 'lib/commons/logging/log.rb', line 100 def fatal? return enabled_for?(FATAL) end |
#info(message, exception = nil) ⇒ Object
55 56 57 |
# File 'lib/commons/logging/log.rb', line 55 def info(, exception = nil) log(INFO, , exception) end |
#info? ⇒ Boolean
85 86 87 |
# File 'lib/commons/logging/log.rb', line 85 def info? return enabled_for?(INFO) end |
#trace(message, exception = nil) ⇒ Object
45 46 47 |
# File 'lib/commons/logging/log.rb', line 45 def trace(, exception = nil) log(TRACE, , exception) end |
#trace? ⇒ Boolean
75 76 77 |
# File 'lib/commons/logging/log.rb', line 75 def trace? return enabled_for?(TRACE) end |
#warn(message, exception = nil) ⇒ Object
60 61 62 |
# File 'lib/commons/logging/log.rb', line 60 def warn(, exception = nil) log(WARN, , exception) end |
#warn? ⇒ Boolean
90 91 92 |
# File 'lib/commons/logging/log.rb', line 90 def warn? return enabled_for?(WARN) end |