Class: Sendxmpp::Log

Inherits:
Logger
  • Object
show all
Includes:
Config
Defined in:
lib/sendxmpp/log.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Config

#config, #update_config

Constructor Details

#initializeLog

Returns a new instance of Log.



11
12
13
14
15
16
17
18
# File 'lib/sendxmpp/log.rb', line 11

def initialize
  if config.logfile
    super(config.logfile)
  else
    super(STDOUT)
  end
  self.level = (config.loglevel.nil?) ? WARN : config.loglevel.to_i
end

Instance Attribute Details

#logger_insObject

Returns the value of attribute logger_ins.



5
6
7
# File 'lib/sendxmpp/log.rb', line 5

def logger_ins
  @logger_ins
end

Class Method Details

.loggerObject



7
8
9
# File 'lib/sendxmpp/log.rb', line 7

def self.logger
  @logger ||= self.new
end