MediaWiki
1.34.0
|
Formats incoming records into a one-line string. More...
Public Member Functions | |
__construct ( $format=null, $dateFormat=null, $allowInlineLineBreaks=false, $ignoreEmptyContextAndExtra=false, $includeStacktraces=false) | |
format (array $record) | |
Protected Member Functions | |
exceptionAsArray ( $e) | |
Convert a throwable to an array of structured data. More... | |
normalizeException ( $e) | |
Convert a Throwable to a string. More... | |
normalizeExceptionArray (array $e) | |
Convert an array of Throwable data to a string. More... | |
Formats incoming records into a one-line string.
An 'exeception' in the log record's context will be treated specially. It will be output for an 'exception' placeholder in the format and excluded from 'context' output if the 'exception' placeholder is present.
Throwables that are logged with this formatter will optional have their stack traces appended. If that is done, MWExceptionHandler::redactedTrace() will be used to redact the trace information.
Definition at line 44 of file LineFormatter.php.
MediaWiki\Logger\Monolog\LineFormatter::__construct | ( | $format = null , |
|
$dateFormat = null , |
|||
$allowInlineLineBreaks = false , |
|||
$ignoreEmptyContextAndExtra = false , |
|||
$includeStacktraces = false |
|||
) |
string | null | $format | The format of the message |
string | null | $dateFormat | The format of the timestamp: one supported by DateTime::format |
bool | $allowInlineLineBreaks | Whether to allow inline line breaks in log entries |
bool | $ignoreEmptyContextAndExtra | |
bool | $includeStacktraces |
Definition at line 53 of file LineFormatter.php.
|
protected |
Convert a throwable to an array of structured data.
Exception | Throwable | $e |
Definition at line 113 of file LineFormatter.php.
References MWExceptionHandler\redactTrace().
Referenced by MediaWiki\Logger\Monolog\LineFormatter\normalizeException().
MediaWiki\Logger\Monolog\LineFormatter::format | ( | array | $record | ) |
Definition at line 67 of file LineFormatter.php.
References $output, MediaWiki\Logger\Monolog\LineFormatter\normalizeException(), and MediaWiki\Logger\Monolog\LineFormatter\normalizeExceptionArray().
|
protected |
Convert a Throwable to a string.
Exception | Throwable | $e |
Definition at line 103 of file LineFormatter.php.
References MediaWiki\Logger\Monolog\LineFormatter\exceptionAsArray(), and MediaWiki\Logger\Monolog\LineFormatter\normalizeExceptionArray().
Referenced by MediaWiki\Logger\Monolog\LineFormatter\format().
|
protected |
Convert an array of Throwable data to a string.
array | $e |
Definition at line 137 of file LineFormatter.php.
References MWExceptionHandler\prettyPrintTrace().
Referenced by MediaWiki\Logger\Monolog\LineFormatter\format(), and MediaWiki\Logger\Monolog\LineFormatter\normalizeException().