Class: Photein::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/photein/logger.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.stderrObject (readonly)

Returns the value of attribute stderr.



19
20
21
# File 'lib/photein/logger.rb', line 19

def stderr
  @stderr
end

.stdoutObject (readonly)

Returns the value of attribute stdout.



19
20
21
# File 'lib/photein/logger.rb', line 19

def stdout
  @stdout
end

Class Method Details

.openObject



21
22
23
24
25
26
27
# File 'lib/photein/logger.rb', line 21

def open
  @stdout = ::Logger.new($stdout)
  @stderr = ::Logger.new($stderr)

  Photein::Config.verbose ? stdout.debug! : stdout.info!
  Photein::Config.verbose ? stderr.warn!  : stderr.fatal!
end