mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 09:06:10 +02:00
Implement the 8 RFC3164 severity levels instead of just 6.
- constants defined for the 2 missing levels: NOTICE and EMERGENCY. - add<level>() and <level>() convenience methods added. - TestHandler and tests updated to account for the two extra levels. - surjective mappings from the RFC3164 to only 6 levels changes to bijective. - README updated accordingly.
This commit is contained in:
18
README.mdown
18
README.mdown
@@ -47,22 +47,24 @@ will be created if you don't set one. The formatters normalize and format
|
||||
incoming records so that they can be used by the handlers to output useful
|
||||
information.
|
||||
|
||||
Custom severity levels are not available. Only six levels (debug, info,
|
||||
warning, error, critical, alert) are present for basic filtering purposes, but
|
||||
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.
|
||||
Custom severity levels are not available. Only the eight RFC 3164 levels (debug,
|
||||
info, notice, warning, error, critical, alert, emergency) are present for basic
|
||||
filtering purposes, but 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.
|
||||
Monolog exposes the 8 standard RFC3164 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.
|
||||
|
||||
- **NOTICE** (250): Normal but significant events.
|
||||
|
||||
- **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.
|
||||
@@ -77,6 +79,8 @@ the classes you need, these are generally enough.
|
||||
down, database unavailable, etc. This should trigger the SMS alerts and wake
|
||||
you up.
|
||||
|
||||
- **EMERGENCY** (600): Emergency: system is unusable.
|
||||
|
||||
Docs
|
||||
====
|
||||
|
||||
|
Reference in New Issue
Block a user