Type:
Class
Description
Application — Add logging support to your application.
Usage
-
Define your application class as a sub-class of this class.
-
Override the
runmethod 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