From 18598c08f3887418c837671f028c74e2565f6f88 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 22 Apr 2012 18:05:03 +0200 Subject: [PATCH] Add log level docs, refs #69 --- README.mdown | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.mdown b/README.mdown index fd0a5d3a..786aac16 100644 --- a/README.mdown +++ b/README.mdown @@ -49,6 +49,30 @@ for sorting and other use cases that would require flexibility, you should add Processors to the Logger that can add extra information (tags, user ip, ..) to the records before they are handled. +Log Levels +---------- + +Monolog exposes 6 log levels. Although it is possible to add more by extending +the classes you need, these are generally enough. + +- **DEBUG** (100): Detailed debug information. + +- **INFO** (200): Interesting events. Examples: User logs in, SQL logs. + +- **WARNING** (300): Exceptional occurrences that are not errors. Examples: + Use of deprecated APIs, poor use of an API, undesirable things that are not + necessarily wrong. + +- **ERROR** (400): Runtime errors that do not require immediate action but + should typically be logged and monitored. + +- **CRITICAL** (500): Critical conditions. Example: Application component + unavailable, unexpected exception. + +- **ALERT** (550): Action must be taken immediately. Example: Entire website + down, database unavailable, etc. This should trigger the SMS alerts and wake + you up. + Docs ====