class CASClient::LoggerWrapper
Wraps a real Logger
. If no real Logger
is set, then this wrapper will quietly swallow any logging calls.
Public Class Methods
new(real_logger=nil)
click to toggle source
# File lib/casclient.rb, line 49 def initialize(real_logger=nil) set_logger(real_logger) end
Public Instance Methods
method_missing(name, *args)
click to toggle source
Log using the appropriate method if we have a logger if we dont’ have a logger, gracefully ignore.
# File lib/casclient.rb, line 58 def method_missing(name, *args) if !@real_logger.nil? && @real_logger.respond_to?(name) @real_logger.send(name, *args) end end
set_real_logger(real_logger)
click to toggle source
Assign the ‘real’ Logger
instance that this dummy instance wraps around.
# File lib/casclient.rb, line 53 def set_real_logger(real_logger) @real_logger = real_logger end