Class: LiteLogger::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/lite_logger/logger.rb

Constant Summary collapse

LEVELS =
{ debug: 0, info: 1, warn: 2, error: 3, fatal: 4 }.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



9
10
11
12
13
# File 'lib/lite_logger/logger.rb', line 9

def initialize
  @level = :info
  @format = :plain
  @destination = $stdout
end

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



7
8
9
# File 'lib/lite_logger/logger.rb', line 7

def destination
  @destination
end

#formatObject

Returns the value of attribute format.



7
8
9
# File 'lib/lite_logger/logger.rb', line 7

def format
  @format
end

#levelObject

Returns the value of attribute level.



7
8
9
# File 'lib/lite_logger/logger.rb', line 7

def level
  @level
end