Type:
Class

Description

Application — Add logging support to your application.

Usage

  1. Define your application class as a sub-class of this class.

  2. Override the 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
log=

log=(logdev) Instance Public methods

2015-04-17 16:39:03
level=

level=(level) Instance Public methods

2015-04-17 16:28:24
new

Application.new(appname = '') Class Public methods Args

2015-04-17 16:26:25
logger=

logger=(logger) Instance Public methods Sets the logger for this application

2015-04-17 16:46:11
start

start() Instance Public methods Start the application. Return the status code

2015-04-17 16:56:42
set_log

set_log(logdev, shift_age = 0, shift_size = 1024000) Instance Public methods Sets

2015-04-17 16:51:17
log

log(severity, message = nil, &block) Instance Public methods See

2015-04-17 16:35:44
logger

logger() Instance Public methods

2015-04-17 16:42:09