Guest User

Untitled

a guest
Feb 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Description
  2. -----------
  3.  
  4. The Logger class provides a simple but sophisticated logging
  5. utility that anyone can use because it's included in the Ruby 1.8.x
  6. standard library.
  7.  
  8. The HOWTOs below give a code-based overview of Logger's usage, but
  9. the basic concept is as follows. You create a Logger object (output
  10. to a file or elsewhere), and use it to log messages. The messages
  11. will have varying levels (+info+, +error+, etc), reflecting their
  12. varying importance. The levels, and their meanings, are:
  13.  
  14. +FATAL+: an unhandleable error that results in a program crash
  15.  
  16. +ERROR+: a handleable error condition
  17.  
  18. +WARN+: a warning
  19.  
  20. +INFO+: generic (useful) information about system operation
  21.  
  22. +DEBUG+: low-level information for developers
  23.  
  24. So each message has a level, and the Logger itself has a level,
  25. which acts as a filter, so you can control the amount of
  26. information emitted from the logger without having to remove actual
  27. messages.
  28.  
  29. For instance, in a production system, you may have your logger(s)
  30. set to +INFO+ (or +WARN+ if you don't want the log files growing
  31. large with repetitive information). When you are developing it,
  32. though, you probably want to know about the program's internal
  33. state, and would set them to +DEBUG+.
Add Comment
Please, Sign In to add comment