Class: Xferase::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/xferase/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/xferase/logger.rb', line 19

def stderr
  @stderr
end

.stdoutObject (readonly)

Returns the value of attribute stdout.



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

def stdout
  @stdout
end

Class Method Details

.openObject



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

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

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