Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Description
- -----------
- The Logger class provides a simple but sophisticated logging
- utility that anyone can use because it's included in the Ruby 1.8.x
- standard library.
- The HOWTOs below give a code-based overview of Logger's usage, but
- the basic concept is as follows. You create a Logger object (output
- to a file or elsewhere), and use it to log messages. The messages
- will have varying levels (+info+, +error+, etc), reflecting their
- varying importance. The levels, and their meanings, are:
- +FATAL+: an unhandleable error that results in a program crash
- +ERROR+: a handleable error condition
- +WARN+: a warning
- +INFO+: generic (useful) information about system operation
- +DEBUG+: low-level information for developers
- So each message has a level, and the Logger itself has a level,
- which acts as a filter, so you can control the amount of
- information emitted from the logger without having to remove actual
- messages.
- For instance, in a production system, you may have your logger(s)
- set to +INFO+ (or +WARN+ if you don't want the log files growing
- large with repetitive information). When you are developing it,
- though, you probably want to know about the program's internal
- state, and would set them to +DEBUG+.
Add Comment
Please, Sign In to add comment