Description

Application — Add logging support to your application.

Usage

  1. Define your application class as a sub-class of this class.
  2. Override ‘run’ method in your class to do many things.
  3. 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
Show files where this class is defined (1 file)
Register or log in to add new notes.