Class: LogUtils::Kernel::Logger
- Inherits:
-
Object
- Object
- LogUtils::Kernel::Logger
show all
- Includes:
- Level
- Defined in:
- lib/logutils/logger.rb
Constant Summary
Constants included
from Level
LogUtils::Kernel::Level::ALL, LogUtils::Kernel::Level::DEBUG, LogUtils::Kernel::Level::ERROR, LogUtils::Kernel::Level::FATAL, LogUtils::Kernel::Level::INFO, LogUtils::Kernel::Level::OFF, LogUtils::Kernel::Level::WARN
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
103
104
105
106
|
# File 'lib/logutils/logger.rb', line 103
def initialize
@listeners = []
@listeners << STDLISTENER end
|
Instance Attribute Details
#listeners ⇒ Object
Returns the value of attribute listeners.
108
109
110
|
# File 'lib/logutils/logger.rb', line 108
def listeners
@listeners
end
|
Class Method Details
.[](class_or_name) ⇒ Object
99
100
101
|
# File 'lib/logutils/logger.rb', line 99
def self.[]( class_or_name )
STDLOGGER
end
|
Instance Method Details
#debug(msg) ⇒ Object
110
111
112
|
# File 'lib/logutils/logger.rb', line 110
def debug( msg )
write( Event.new( DEBUG, msg ) )
end
|
#error(msg) ⇒ Object
122
123
124
|
# File 'lib/logutils/logger.rb', line 122
def error( msg )
write( Event.new( ERROR, msg ) )
end
|
#fatal(msg) ⇒ Object
126
127
128
|
# File 'lib/logutils/logger.rb', line 126
def fatal( msg )
write( Event.new( FATAL, msg ) )
end
|
#info(msg) ⇒ Object
114
115
116
|
# File 'lib/logutils/logger.rb', line 114
def info( msg )
write( Event.new( INFO, msg ) )
end
|
#warn(msg) ⇒ Object
118
119
120
|
# File 'lib/logutils/logger.rb', line 118
def warn( msg )
write( Event.new( WARN, msg ) )
end
|