Class: Slf4r::LoggerFacade
- Inherits:
-
AbstractLoggerFacade
- Object
- AbstractLoggerFacade
- Slf4r::LoggerFacade
- Defined in:
- lib/slf4r/java_logger.rb,
lib/slf4r/noop_logger.rb,
lib/slf4r/ruby_logger.rb,
lib/slf4r/log4r_logger.rb,
lib/slf4r/logging_logger.rb,
lib/slf4r/wrapped_logger.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #debug(msg = nil, exception = nil) ⇒ Object
- #debug? ⇒ Boolean
- #error(msg = nil, exception = nil) ⇒ Object
- #error? ⇒ Boolean
- #fatal(msg = nil, exception = nil) ⇒ Object
- #fatal? ⇒ Boolean
- #info(msg = nil, exception = nil) ⇒ Object
- #info? ⇒ Boolean
-
#initialize(name) ⇒ LoggerFacade
constructor
A new instance of LoggerFacade.
- #warn(msg = nil, exception = nil) ⇒ Object
- #warn? ⇒ Boolean
Constructor Details
#initialize(name) ⇒ LoggerFacade
Returns a new instance of LoggerFacade.
17 18 19 20 |
# File 'lib/slf4r/java_logger.rb', line 17 def initialize(name) @name = name @logger = org.slf4j.LoggerFactory.getLogger(name.to_s.sub(/^::/, '').gsub(/::/, '.')) end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
15 16 17 |
# File 'lib/slf4r/java_logger.rb', line 15 def logger @logger end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/slf4r/java_logger.rb', line 13 def name @name end |
Instance Method Details
#debug(msg = nil, exception = nil) ⇒ Object
16 17 |
# File 'lib/slf4r/noop_logger.rb', line 16 def debug(msg = nil, exception = nil) end |
#debug? ⇒ Boolean
12 13 14 |
# File 'lib/slf4r/noop_logger.rb', line 12 def debug? false end |
#error(msg = nil, exception = nil) ⇒ Object
37 38 |
# File 'lib/slf4r/noop_logger.rb', line 37 def error(msg = nil, exception = nil) end |
#error? ⇒ Boolean
33 34 35 |
# File 'lib/slf4r/noop_logger.rb', line 33 def error? false end |
#fatal(msg = nil, exception = nil) ⇒ Object
44 45 |
# File 'lib/slf4r/noop_logger.rb', line 44 def fatal(msg = nil, exception = nil) end |
#fatal? ⇒ Boolean
40 41 42 |
# File 'lib/slf4r/noop_logger.rb', line 40 def fatal? false end |
#info(msg = nil, exception = nil) ⇒ Object
23 24 |
# File 'lib/slf4r/noop_logger.rb', line 23 def info(msg = nil, exception = nil) end |
#info? ⇒ Boolean
19 20 21 |
# File 'lib/slf4r/noop_logger.rb', line 19 def info? false end |
#warn(msg = nil, exception = nil) ⇒ Object
30 31 |
# File 'lib/slf4r/noop_logger.rb', line 30 def warn(msg = nil, exception = nil) end |
#warn? ⇒ Boolean
26 27 28 |
# File 'lib/slf4r/noop_logger.rb', line 26 def warn? false end |