Interface for a logger.
More...
|
| alert ($msg, array $args=array(),\Exception $exception=null) |
|
| critical ($msg, array $args=array(),\Exception $exception=null) |
|
| debug ($msg, array $args=array(),\Exception $exception=null) |
|
| emergency ($msg, array $args=array(),\Exception $exception=null) |
|
| error ($msg, array $args=array(),\Exception $exception=null) |
|
| exception ($msg,\Exception $exception, array $args=array()) |
|
| getClass () |
|
| getFilters () |
|
| getHandlers () |
|
| getLevel () |
|
| getMethod () |
|
| getNamespace () |
|
| getRecordFactory () |
|
| info ($msg, array $args=array(),\Exception $exception=null) |
|
| isEnabledFor ($level) |
|
| log ($level, $msg, array $args=array(),\Exception $exception=null) |
|
| notice ($msg, array $args=array(),\Exception $exception=null) |
|
| setFilters (\Plop\FiltersCollectionAbstract $filters) |
|
| setHandlers (\Plop\HandlersCollectionAbstract $handlers) |
|
| setLevel ($level) |
|
| setRecordFactory (\Plop\RecordFactoryInterface $factory) |
|
| warn ($msg, array $args=array(),\Exception $exception=null) |
|
| warning ($msg, array $args=array(),\Exception $exception=null) |
|
Interface for a logger.
Definition at line 27 of file LoggerInterface.php.
Plop\LoggerInterface::alert |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::ALERT log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::critical |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::CRITICAL log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::debug |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::DEBUG log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::emergency |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::EMERGENCY log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::error |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::ERROR log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::exception |
( |
|
$msg, |
|
|
\Exception |
$exception, |
|
|
array |
$args = array() |
|
) |
| |
Log an exception.
- Parameters
-
string | $msg | The message to log. |
Exception | $exception | An exception that should also be logged. The exception's stack trace will be included in the final message. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
- Return values
-
- Note
- The message containing the exception will be logged with the Plop::ERROR log level. To log it using another log level, call another logging method and pass the exception as the value for the $exception argument.
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::getClass |
( |
| ) |
|
Plop\LoggerInterface::getFilters |
( |
| ) |
|
Plop\LoggerInterface::getHandlers |
( |
| ) |
|
Plop\LoggerInterface::getLevel |
( |
| ) |
|
Return the minimum level a log record must have to be handled by this class.
- Return values
-
int | Minimum level at which log records will be accepted. |
Implemented in Plop\Logger, and Plop\IndirectLoggerAbstract.
Plop\LoggerInterface::getMethod |
( |
| ) |
|
Plop\LoggerInterface::getNamespace |
( |
| ) |
|
Plop\LoggerInterface::getRecordFactory |
( |
| ) |
|
Plop\LoggerInterface::info |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::INFO log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::isEnabledFor |
( |
|
$level | ) |
|
Return a flag indicating whether a log with the given level would be handled by this instance.
- Parameters
-
int | string | $level | Level to test. |
- Return values
-
bool | true if a log with the given level would be handled by this instance, or false if it would be ignored. |
Implemented in Plop\Logger, and Plop\IndirectLoggerAbstract.
Plop\LoggerInterface::log |
( |
|
$level, |
|
|
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the given log level.
- Parameters
-
int | $level | The log level for the message. This argument is only useful for custom log levels. For pre-defined levels, you should consider using the following shortcut methods:
|
string | $msg | The message to log (possibly with special sequences to embed formatted values from the $args parameter). The exact sequence used to embed values depends on the interpolator in use. For the default interpolator (Plop::Interpolator::Percent), each sequence must follow this model: %(name)<spec> where name is the key of the variable, taken from the $args parameter, and <spec> is a valid sprintf() format specification, such as%(foo)04d |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\Logger, and Plop\IndirectLoggerAbstract.
Plop\LoggerInterface::notice |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::NOTICE log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Set the collection of filters associated with this logger.
- Parameters
-
Plop::FiltererInterface | $filters | New collection of filters to associate with this logger. |
- Return values
-
Implemented in Plop\Logger, and Plop\IndirectLoggerAbstract.
Plop\LoggerInterface::setLevel |
( |
|
$level | ) |
|
Set the minimum level a log record must have to be handled by this class.
- Parameters
-
int | string | $level | The new minimum level at which log records will be accepted, either as an integer or as a level name. |
- Return values
-
Implemented in Plop\Logger, and Plop\IndirectLoggerAbstract.
Plop\LoggerInterface::warn |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::WARN log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
Plop\LoggerInterface::warning |
( |
|
$msg, |
|
|
array |
$args = array() , |
|
|
\Exception |
$exception = null |
|
) |
| |
Log a message with the Plop::WARNING log level.
- Parameters
-
string | $msg | The message to log. |
array | $args | (optional) Associative array of values that may be replaced dynamically in the log message. By default, an empty array is used. |
Exception | null | $exception | (optional) An exception that should also be logged. The exception's stack trace will be included in the final message. |
- Return values
-
Implemented in Plop\LoggerAbstract.
The documentation for this interface was generated from the following file: