Monolog\Formatter\GelfMessageFormatter
Serializes a log message to GELF
- Author: Matt Lehner <mlehner@gmail.com>
Synopsis
class GelfMessageFormatter
extends NormalizerFormatter
{
- // Inherited constants from NormalizerFormatter
- const SIMPLE_DATE = "Y-m-d H:i:s";
- // members
- protected string $systemName;
- protected string $extraPrefix;
- protected string $contextPrefix;
- private array $logLevels;
- // Inherited members from NormalizerFormatter
- protected $dateFormat;
- // methods
- public void __construct()
- public void format()
- // Inherited methods from NormalizerFormatter
- public void __construct()
- public void format()
- public void formatBatch()
- protected void normalize()
- protected void toJson()
Hierarchy
Constants
Name | Value |
---|---|
SIMPLE_DATE | "Y-m-d H:i:s" |
Members
private
-
$logLevels
Translates Monolog log levels to Graylog2 log priorities.
protected
- $contextPrefix — string
- $dateFormat
- $extraPrefix — string
- $systemName — string
Methods
public
- __construct()
- format() — {@inheritdoc}
Inherited from Monolog\Formatter\NormalizerFormatter
protected
public
- format() — {@inheritdoc}
- formatBatch() — {@inheritdoc}