Module: ScoutAgent::WireTap::Severity

Included in:
ScoutAgent::WireTap
Defined in:
lib/scout_agent/wire_tap.rb

Overview

This module includes the severity levels used by all WireTap instances. Changing the constants in this module will rework the interface methods in WireTap used to log messages. Any changes made here should be done before logs are created.

WireTap instances will have the following methods for each constant in this module (examples are for the WARN constant):

# check if a level is currently being logged
if wire_tap.warn?
  # ...
end

# log a message at the indicated level
wire_tap.warn "Message goes here."

# log a message, skipping creation if the level is not being logged
wire_tap.warn { build_expensive_warning_message() }

# log a message, overriding +progname+
wire_tap.warn("my_process_name") { "Message goes here." }

Constant Summary collapse

DEBUG =

Low-lever information for developers.

0
INFO =

Useful information about normal system operations.

1
WARN =

A warning about something that may not have worked as expected.

2
ERROR =

A handled error condition.

3
FATAL =

An unhandleable error.

4
UNKNOWN =

A non-classified message. (Dynamic method dispatch is not done for this special case.)

5