mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-10 23:24:02 +02:00
Cosmetic fixes
This commit is contained in:
24
README.mdown
24
README.mdown
@@ -47,24 +47,26 @@ 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
|
incoming records so that they can be used by the handlers to output useful
|
||||||
information.
|
information.
|
||||||
|
|
||||||
Custom severity levels are not available. Only the eight RFC 5424 levels (debug,
|
Custom severity levels are not available. Only the eight
|
||||||
info, notice, warning, error, critical, alert, emergency) are present for basic
|
[RFC 5424](http://tools.ietf.org/html/rfc5424) levels (debug, info, notice,
|
||||||
filtering purposes, but for sorting and other use cases that would require
|
warning, error, critical, alert, emergency) are present for basic filtering
|
||||||
flexibility, you should add Processors to the Logger that can add extra
|
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.
|
information (tags, user ip, ..) to the records before they are handled.
|
||||||
|
|
||||||
Log Levels
|
Log Levels
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Monolog supports all 8 logging levels defined in RFC5424, but unless you
|
Monolog supports all 8 logging levels defined in
|
||||||
specifically need syslog compatibility, it is advised to only use DEBUG, INFO,
|
[RFC 5424](http://tools.ietf.org/html/rfc5424), but unless you specifically
|
||||||
WARNING, ERROR, CRITICAL, ALERT.
|
need syslog compatibility, it is advised to only use DEBUG, INFO, WARNING,
|
||||||
|
ERROR, CRITICAL, ALERT.
|
||||||
|
|
||||||
- **DEBUG** (100): Detailed debug information.
|
- **DEBUG** (100): Detailed debug information.
|
||||||
|
|
||||||
- **INFO** (200): Interesting events. Examples: User logs in, SQL logs.
|
- **INFO** (200): Interesting events. Examples: User logs in, SQL logs.
|
||||||
|
|
||||||
- **NOTICE** (250): Normal but significant events.
|
- NOTICE (250): Normal but significant events.
|
||||||
|
|
||||||
- **WARNING** (300): Exceptional occurrences that are not errors. Examples:
|
- **WARNING** (300): Exceptional occurrences that are not errors. Examples:
|
||||||
Use of deprecated APIs, poor use of an API, undesirable things that are not
|
Use of deprecated APIs, poor use of an API, undesirable things that are not
|
||||||
@@ -80,12 +82,12 @@ WARNING, ERROR, CRITICAL, ALERT.
|
|||||||
down, database unavailable, etc. This should trigger the SMS alerts and wake
|
down, database unavailable, etc. This should trigger the SMS alerts and wake
|
||||||
you up.
|
you up.
|
||||||
|
|
||||||
- **EMERGENCY** (600): Emergency: system is unusable.
|
- EMERGENCY (600): Emergency: system is unusable.
|
||||||
|
|
||||||
Docs
|
Docs
|
||||||
====
|
====
|
||||||
|
|
||||||
**See the `doc` directory for more detailed documentation.
|
**See the `doc` directory for more detailed documentation.
|
||||||
The following is only a list of all parts that come with Monolog.**
|
The following is only a list of all parts that come with Monolog.**
|
||||||
|
|
||||||
Handlers
|
Handlers
|
||||||
@@ -102,7 +104,7 @@ Handlers
|
|||||||
inline `console` messages within Chrome.
|
inline `console` messages within Chrome.
|
||||||
- _MongoDBHandler_: Handler to write records in MongoDB via a
|
- _MongoDBHandler_: Handler to write records in MongoDB via a
|
||||||
[Mongo](http://pecl.php.net/package/mongo) extension connection.
|
[Mongo](http://pecl.php.net/package/mongo) extension connection.
|
||||||
- _NativeMailHandler_: Sends emails using PHP's
|
- _NativeMailHandler_: Sends emails using PHP's
|
||||||
[`mail()`](http://php.net/manual/en/function.mail.php) function.
|
[`mail()`](http://php.net/manual/en/function.mail.php) function.
|
||||||
- _SwiftMailerHandler_: Sends emails using a `Swift_Mailer` instance.
|
- _SwiftMailerHandler_: Sends emails using a `Swift_Mailer` instance.
|
||||||
- _SyslogHandler_: Logs records to the syslog.
|
- _SyslogHandler_: Logs records to the syslog.
|
||||||
|
@@ -236,8 +236,8 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the NOTICE level.
|
* Adds a log record at the NOTICE level.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
* @return Boolean Whether the record has been processed
|
* @return Boolean Whether the record has been processed
|
||||||
*/
|
*/
|
||||||
public function addNotice($message, array $context = array())
|
public function addNotice($message, array $context = array())
|
||||||
@@ -296,8 +296,8 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the EMERGENCY level.
|
* Adds a log record at the EMERGENCY level.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
* @return Boolean Whether the record has been processed
|
* @return Boolean Whether the record has been processed
|
||||||
*/
|
*/
|
||||||
public function addEmergency($message, array $context = array())
|
public function addEmergency($message, array $context = array())
|
||||||
@@ -305,7 +305,6 @@ class Logger
|
|||||||
return $this->addRecord(self::EMERGENCY, $message, $context);
|
return $this->addRecord(self::EMERGENCY, $message, $context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the name of the logging level.
|
* Gets the name of the logging level.
|
||||||
*
|
*
|
||||||
@@ -344,12 +343,10 @@ class Logger
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ZF Logger Compat
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a log record at the DEBUG level.
|
* Adds a log record at the DEBUG level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -363,7 +360,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the INFO level.
|
* Adds a log record at the INFO level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -377,7 +374,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the INFO level.
|
* Adds a log record at the INFO level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -391,7 +388,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the WARNING level.
|
* Adds a log record at the WARNING level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -405,7 +402,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the ERROR level.
|
* Adds a log record at the ERROR level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -419,7 +416,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the CRITICAL level.
|
* Adds a log record at the CRITICAL level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -433,7 +430,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the ALERT level.
|
* Adds a log record at the ALERT level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
@@ -447,7 +444,7 @@ class Logger
|
|||||||
/**
|
/**
|
||||||
* Adds a log record at the EMERGENCY level.
|
* Adds a log record at the EMERGENCY level.
|
||||||
*
|
*
|
||||||
* This method allows to have an easy ZF/Symfony 2 compatibility.
|
* This method allows for compatibility with common interfaces.
|
||||||
*
|
*
|
||||||
* @param string $message The log message
|
* @param string $message The log message
|
||||||
* @param array $context The log context
|
* @param array $context The log context
|
||||||
|
Reference in New Issue
Block a user