1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 00:56:08 +02:00

Add scalar types to processor/formatters and top level classes

This commit is contained in:
Jordi Boggiano
2016-09-25 21:23:35 +02:00
parent 760dc44ebd
commit 6e6586257d
29 changed files with 130 additions and 196 deletions

View File

@@ -46,9 +46,8 @@ class LogstashFormatter extends NormalizerFormatter
* @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine
* @param string $extraPrefix prefix for extra keys inside logstash "fields"
* @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_
* @param int $version the logstash format version to use, defaults to 0
*/
public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_')
public function __construct(string $applicationName, string $systemName = null, string $extraPrefix = null, string $contextPrefix = 'ctxt_')
{
// logstash requires a ISO 8601 format date with optional millisecond precision.
parent::__construct('Y-m-d\TH:i:s.uP');
@@ -62,7 +61,7 @@ class LogstashFormatter extends NormalizerFormatter
/**
* {@inheritdoc}
*/
public function format(array $record)
public function format(array $record): string
{
$record = parent::format($record);