MediaWiki master
|
Modified version of Monolog\Formatter\LogstashFormatter. More...
Inherits Monolog\Formatter\LogstashFormatter.
Inherited by MediaWiki\Logger\Monolog\CeeFormatter.
Public Member Functions | |
__construct (string $applicationName, ?string $systemName=null, string $extraKey='', string $contextKey='ctxt_', $version=self::V0) | |
TODO: See T247675 for removing this override. | |
format (array $record) | |
Public Attributes | |
const | V0 = 0 |
const | V1 = 1 |
Protected Member Functions | |
fixKeyConflicts (array $fields, array $context) | |
Rename any context field that would otherwise overwrite a message key. | |
formatMonologV0 (array $record) | |
Borrowed from monolog/monolog 1.25.3 https://github.com/Seldaek/monolog/blob/1.x/src/Monolog/Formatter/LogstashFormatter.php#L87-L128. | |
formatMonologV1 (array $record) | |
Borrowed mostly from monolog/monolog 1.25.3 https://github.com/Seldaek/monolog/blob/1.25.3/src/Monolog/Formatter/LogstashFormatter.php#L130-165. | |
formatV0 (array $record) | |
Prevent key conflicts. | |
formatV1 (array $record) | |
Prevent key conflicts. | |
normalizeException (\Throwable $e, int $depth=0) | |
Use a more user-friendly trace format than Monolog\Formatter\NormalizerFormatter. | |
Protected Attributes | |
array | $reservedKeys |
Keys which should not be used in log context. | |
int | $version |
Logstash format version to use. | |
Modified version of Monolog\Formatter\LogstashFormatter.
Definition at line 15 of file LogstashFormatter.php.
MediaWiki\Logger\Monolog\LogstashFormatter::__construct | ( | string | $applicationName, |
?string | $systemName = null, | ||
string | $extraKey = '', | ||
string | $contextKey = 'ctxt_', | ||
$version = self::V0 ) |
TODO: See T247675 for removing this override.
string | $applicationName | The application that sends the data, used as the "type" field of logstash |
string | null | $systemName | The system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine |
string | $extraKey | The key for extra keys inside logstash "fields", defaults to '' |
string | $contextKey | The key for context keys inside logstash "fields", defaults |
int | $version | The logstash format version to use, defaults to V0 to '' |
Definition at line 49 of file LogstashFormatter.php.
References MediaWiki\Logger\Monolog\LogstashFormatter\$version.
|
protected |
Rename any context field that would otherwise overwrite a message key.
array | $fields | Fields to be sent to logstash |
array | $context | Copy of the original $record['context'] |
Definition at line 209 of file LogstashFormatter.php.
MediaWiki\Logger\Monolog\LogstashFormatter::format | ( | array | $record | ) |
Reimplemented in MediaWiki\Logger\Monolog\CeeFormatter.
Definition at line 56 of file LogstashFormatter.php.
References MediaWiki\Logger\Monolog\LogstashFormatter\formatV1().
|
protected |
Borrowed from monolog/monolog 1.25.3 https://github.com/Seldaek/monolog/blob/1.x/src/Monolog/Formatter/LogstashFormatter.php#L87-L128.
array | $record |
Definition at line 95 of file LogstashFormatter.php.
|
protected |
Borrowed mostly from monolog/monolog 1.25.3 https://github.com/Seldaek/monolog/blob/1.25.3/src/Monolog/Formatter/LogstashFormatter.php#L130-165.
array | $record |
Definition at line 161 of file LogstashFormatter.php.
|
protected |
Prevent key conflicts.
array | $record |
Definition at line 74 of file LogstashFormatter.php.
|
protected |
Prevent key conflicts.
array | $record |
Definition at line 142 of file LogstashFormatter.php.
Referenced by MediaWiki\Logger\Monolog\LogstashFormatter\format().
|
protected |
Use a more user-friendly trace format than Monolog\Formatter\NormalizerFormatter.
\\Throwable | $e | |
int | $depth |
Definition at line 230 of file LogstashFormatter.php.
|
protected |
Keys which should not be used in log context.
Definition at line 21 of file LogstashFormatter.php.
|
protected |
Logstash format version to use.
Definition at line 35 of file LogstashFormatter.php.
Referenced by MediaWiki\Logger\Monolog\LogstashFormatter\__construct().
const MediaWiki\Logger\Monolog\LogstashFormatter::V0 = 0 |
Definition at line 17 of file LogstashFormatter.php.
const MediaWiki\Logger\Monolog\LogstashFormatter::V1 = 1 |
Definition at line 18 of file LogstashFormatter.php.