Class: Slf4r::LoggerFacade

Inherits:
AbstractLoggerFacade show all
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

Instance Method Summary collapse

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

#loggerObject (readonly)

Returns the value of attribute logger.



15
16
17
# File 'lib/slf4r/java_logger.rb', line 15

def logger
  @logger
end

#nameObject (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (Boolean)


26
27
28
# File 'lib/slf4r/noop_logger.rb', line 26

def warn?
  false
end