Module: LogKernel

Defined in:
lib/logutils.rb,
lib/logutils/logger.rb,
lib/logutils/version.rb

Defined Under Namespace

Modules: Level Classes: ConsoleHandler, Event, Logger

Constant Summary collapse

LEVEL_NAME =
[
 'all',     # 0
 'debug',   # 1
 'info',    # 2
 'warn',    # 3
 'error',   # 4
 'fatal',   # 5
 'unknown', # 6
 'off'      # 7
]
LEVEL_HASH =

map symbol to levelno; if not match map to UNKNOWN

{
  all:     Level::ALL,
  debug:   Level::DEBUG,
  info:    Level::INFO,
  warn:    Level::WARN,
  error:   Level::ERROR,
  fatal:   Level::FATAL,
  off:     Level::OFF
}
STDHANDLER =

class ConsoleHandler

ConsoleHandler.new
STDLOGGER =

class Logger

Logger.new
MAJOR =

todo: namespace inside version or something - why? why not??

0
MINOR =
6
PATCH =
1
VERSION =
[MAJOR,MINOR,PATCH].join('.')

Class Method Summary collapse

Class Method Details



21
22
23
# File 'lib/logutils/version.rb', line 21

def self.banner
  "logutils/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
end

.rootObject



25
26
27
# File 'lib/logutils/version.rb', line 25

def self.root
  "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
end

.versionObject



17
18
19
# File 'lib/logutils/version.rb', line 17

def self.version
  VERSION
end