Class: PoolParty::PoolPartyLog

Inherits:
Object
  • Object
show all
Defined in:
lib/poolparty/pool_party_log.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.fileObject

:nodoc



10
11
12
# File 'lib/poolparty/pool_party_log.rb', line 10

def file
  @file
end

.levelObject

:nodoc



10
11
12
# File 'lib/poolparty/pool_party_log.rb', line 10

def level
  @level
end

.loggerObject

:nodoc



10
11
12
# File 'lib/poolparty/pool_party_log.rb', line 10

def logger
  @logger
end

Class Method Details

.init(path = false) ⇒ Object



12
13
14
15
16
# File 'lib/poolparty/pool_party_log.rb', line 12

def init(path = false)
  @file = path ? File.join(path, "poolparty.log") : StringIO.new
  @logger = Logger.new(file)
  level = @log_level = :info
end

.method_missing(method_symbol, *args) ⇒ Object



38
39
40
41
# File 'lib/poolparty/pool_party_log.rb', line 38

def method_missing(method_symbol, *args)
  init unless @logger
  @logger.send(method_symbol, *args)
end