Class: Madvertise::Logging::ImprovedLogger::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/madvertise/logging/improved_logger.rb

Overview

The Formatter class is responsible for formatting log messages. The default format is:

YYYY:MM:DD HH:MM:SS.MS daemon_name(pid) level: message

Constant Summary collapse

RUBY2SYSLOG =
{
  :debug => 7,
  :info => 6,
  :warn => 4,
  :error => 3,
  :fatal => 2,
  :unknown => 3,
}

Class Attribute Summary collapse

Class Attribute Details

.formatObject

Format string for log messages.



375
376
377
# File 'lib/madvertise/logging/improved_logger.rb', line 375

def format
  @format
end

.log4j_formatObject

Returns the value of attribute log4j_format.



376
377
378
# File 'lib/madvertise/logging/improved_logger.rb', line 376

def log4j_format
  @log4j_format
end

.time_formatObject

Format string for timestamps in log messages.



379
380
381
# File 'lib/madvertise/logging/improved_logger.rb', line 379

def time_format
  @time_format
end