class
Logger::Application
v1_8_6_287 -
Show latest stable
- Superclass: Object
Description
Application — Add logging support to your application.
Usage
- Define your application class as a sub-class of this class.
- Override ‘run’ method in your class to do many things.
- Instantiate it and invoke ‘start’.
Example
class FooApp < Application def initialize(foo_app, application_specific, arguments) super('FooApp') # Name of the application. end def run ... log(WARN, 'warning', 'my_method1') ... @log.error('my_method2') { 'Error!' } ... end end status = FooApp.new(....).start
Included modules
- Logger::Severity
Attributes
| [R] | appname |
| [R] | logdev |
Files
- lib/logger.rb