MediaWiki  master
MediaWiki\Logger\Monolog\CeeFormatter Class Reference

CeeFormatter extends LogstashFormatter to prefix records with a "cee cookie". More...

Inheritance diagram for MediaWiki\Logger\Monolog\CeeFormatter:
Collaboration diagram for MediaWiki\Logger\Monolog\CeeFormatter:

Public Member Functions

 format (array $record)
 Format records with a cee cookie. More...
 
- Public Member Functions inherited from MediaWiki\Logger\Monolog\LogstashFormatter
 __construct (string $applicationName, ?string $systemName=null, string $extraKey='', string $contextKey='ctxt_', $version=self::V0)
 See T247675 for removing this override. More...
 

Additional Inherited Members

- Public Attributes inherited from MediaWiki\Logger\Monolog\LogstashFormatter
const V0 = 0
 
const V1 = 1
 
- Protected Member Functions inherited from MediaWiki\Logger\Monolog\LogstashFormatter
 fixKeyConflicts (array $fields, array $context)
 Check whether some context field would overwrite another message key. More...
 
 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. More...
 
 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. More...
 
 formatV0 (array $record)
 Prevent key conflicts. More...
 
 formatV1 (array $record)
 Prevent key conflicts. More...
 
 normalizeException (\Throwable $e, int $depth=0)
 Use a more user-friendly trace format than NormalizerFormatter. More...
 
- Protected Attributes inherited from MediaWiki\Logger\Monolog\LogstashFormatter
array $reservedKeys
 Keys which should not be used in log context. More...
 
int $version
 Logstash format version to use. More...
 

Detailed Description

CeeFormatter extends LogstashFormatter to prefix records with a "cee cookie".

The cookie is used to tell JSON and non-JSON messages apart when logging to syslog. See also: https://www.rsyslog.com/doc/v8-stable/configuration/modules/mmjsonparse.html

Since
1.33

Definition at line 12 of file CeeFormatter.php.

Member Function Documentation

◆ format()

MediaWiki\Logger\Monolog\CeeFormatter::format ( array  $record)

Format records with a cee cookie.

Parameters
array$record
Returns
string

Reimplemented from MediaWiki\Logger\Monolog\LogstashFormatter.

Definition at line 18 of file CeeFormatter.php.


The documentation for this class was generated from the following file: