Type:
Class
Description
Application — Add logging support to your application.
Usage
-
Define your application class as a sub-class of this class.
-
Override the
run
method in your class to do many things. -
Instantiate it and invoke start.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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 |