Class: Skynet::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/skynet/skynet_logger.rb

Constant Summary collapse

@@log =
nil

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.getObject



17
18
19
20
21
22
23
# File 'lib/skynet/skynet_logger.rb', line 17

def self.get
  if not @@log
    @@log = self.new(Skynet::Config.new.logfile_location)
    @@log.level = Skynet::CONFIG[:SKYNET_LOG_LEVEL]
  end  
  @@log
end

.log=(log) ⇒ Object



25
26
27
# File 'lib/skynet/skynet_logger.rb', line 25

def self.log=(log)
  @@log = log
end

Instance Method Details

#printlog(*args) ⇒ Object



29
30
31
# File 'lib/skynet/skynet_logger.rb', line 29

def printlog(*args)
  self.class.get.unknown(*args)
end