MediaWiki
1.30.0
|
Log message formatter that uses the apache Avro format. More...
Public Member Functions | |
__construct (array $schemas) | |
format (array $record) | |
Formats the record context into a binary string per the schema configured for the records channel. More... | |
formatBatch (array $records) | |
Format a set of records into a list of binary strings conforming to the configured schema. More... | |
getSchemaRevisionId ( $channel) | |
Get the writer for the named channel. More... | |
Protected Member Functions | |
getSchema ( $channel) | |
Get the writer for the named channel. More... | |
Protected Attributes | |
AvroIOBinaryEncoder | $encoder |
AvroStringIO | $io |
array | $schemas |
Map from schema name to schema definition. More... | |
AvroIODatumWriter | $writer |
Private Member Functions | |
encodeLong ( $id) | |
convert an integer to a 64bits big endian long (Java compatible) NOTE: certainly only compatible with PHP 64bits More... | |
Log message formatter that uses the apache Avro format.
Definition at line 38 of file AvroFormatter.php.
MediaWiki\Logger\Monolog\AvroFormatter::__construct | ( | array | $schemas | ) |
array | $schemas | Map from Monolog channel to Avro schema. Each schema can be either the JSON string or decoded into PHP arrays. |
Definition at line 68 of file AvroFormatter.php.
References MediaWiki\Logger\Monolog\AvroFormatter\$schemas, and writer.
|
private |
convert an integer to a 64bits big endian long (Java compatible) NOTE: certainly only compatible with PHP 64bits
int | $id |
Definition at line 166 of file AvroFormatter.php.
Referenced by MediaWiki\Logger\Monolog\AvroFormatter\format().
MediaWiki\Logger\Monolog\AvroFormatter::format | ( | array | $record | ) |
Formats the record context into a binary string per the schema configured for the records channel.
array | $record |
Definition at line 83 of file AvroFormatter.php.
References $e, MediaWiki\Logger\Monolog\AvroFormatter\encodeLong(), AvroValidator\getErrors(), MediaWiki\Logger\Monolog\AvroFormatter\getSchema(), MediaWiki\Logger\Monolog\AvroFormatter\getSchemaRevisionId(), and writer.
Referenced by MediaWiki\Logger\Monolog\AvroFormatter\formatBatch().
MediaWiki\Logger\Monolog\AvroFormatter::formatBatch | ( | array | $records | ) |
Format a set of records into a list of binary strings conforming to the configured schema.
array | $records |
Definition at line 109 of file AvroFormatter.php.
References as, and MediaWiki\Logger\Monolog\AvroFormatter\format().
|
protected |
Get the writer for the named channel.
string | $channel | Name of the schema to fetch |
Definition at line 126 of file AvroFormatter.php.
Referenced by MediaWiki\Logger\Monolog\AvroFormatter\format().
MediaWiki\Logger\Monolog\AvroFormatter::getSchemaRevisionId | ( | $channel | ) |
Get the writer for the named channel.
string | $channel | Name of the schema |
Definition at line 153 of file AvroFormatter.php.
Referenced by MediaWiki\Logger\Monolog\AvroFormatter\format().
|
protected |
Definition at line 56 of file AvroFormatter.php.
|
protected |
Definition at line 51 of file AvroFormatter.php.
|
protected |
Map from schema name to schema definition.
Definition at line 39 of file AvroFormatter.php.
Referenced by MediaWiki\Logger\Monolog\AvroFormatter\__construct().
|
protected |
Definition at line 61 of file AvroFormatter.php.