Merge "maintenance: Script to rename titles for Unicode uppercasing changes"
[lhc/web/wiklou.git] / includes / debug / logger / monolog / CeeFormatter.php
1 <?php
2
3 namespace MediaWiki\Logger\Monolog;
4
5 /**
6 * CeeFormatter extends LogstashFormatter to prefix records with a "cee cookie".
7 * The cookie is used to tell JSON and non-JSON messages apart when logging to syslog.
8 * See also: https://www.rsyslog.com/doc/v8-stable/configuration/modules/mmjsonparse.html
9 *
10 * Compatible with Monolog 1.x only.
11 *
12 * @since 1.33
13 */
14 class CeeFormatter extends LogstashFormatter {
15 /**
16 * Format records with a cee cookie
17 * @param array $record
18 * @return mixed
19 */
20 public function format( array $record ) {
21 return "@cee: " . parent::format( $record );
22 }
23 }