X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/monolog/monolog/src/Monolog/Formatter
home
/
prisjneg
/
public_html
/
vendor
/
monolog
/
monolog
/
src
/
Monolog
/
Formatter
/
📁
..
📄
ChromePHPFormatter.php
(2.21 KB)
📄
ElasticaFormatter.php
(1.86 KB)
📄
ElasticsearchFormatter.php
(1.8 KB)
📄
FlowdockFormatter.php
(2.48 KB)
📄
FluentdFormatter.php
(2.03 KB)
📄
FormatterInterface.php
(870 B)
📄
GelfMessageFormatter.php
(4.85 KB)
📄
GoogleCloudLoggingFormatter.php
(1.15 KB)
📄
HtmlFormatter.php
(4.44 KB)
📄
JsonFormatter.php
(6.33 KB)
📄
LineFormatter.php
(9.52 KB)
📄
LogglyFormatter.php
(1.25 KB)
📄
LogmaticFormatter.php
(1.54 KB)
📄
LogstashFormatter.php
(3.35 KB)
📄
MongoDBFormatter.php
(4.81 KB)
📄
NormalizerFormatter.php
(9.93 KB)
📄
ScalarFormatter.php
(1.11 KB)
📄
SyslogFormatter.php
(1.85 KB)
📄
WildfireFormatter.php
(3.89 KB)
Editing: LogglyFormatter.php
<?php declare(strict_types=1); /* * This file is part of the Monolog package. * * (c) Jordi Boggiano <j.boggiano@seld.be> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Monolog\Formatter; use Monolog\LogRecord; /** * Encodes message information into JSON in a format compatible with Loggly. * * @author Adam Pancutt <adam@pancutt.com> */ class LogglyFormatter extends JsonFormatter { /** * Overrides the default batch mode to new lines for compatibility with the * Loggly bulk API. */ public function __construct(int $batchMode = self::BATCH_MODE_NEWLINES, bool $appendNewline = false) { parent::__construct($batchMode, $appendNewline); } /** * Appends the 'timestamp' parameter for indexing by Loggly. * * @see https://www.loggly.com/docs/automated-parsing/#json * @see \Monolog\Formatter\JsonFormatter::format() */ protected function normalizeRecord(LogRecord $record): array { $recordData = parent::normalizeRecord($record); $recordData["timestamp"] = $record->datetime->format("Y-m-d\TH:i:s.uO"); unset($recordData["datetime"]); return $recordData; } }
Upload File
Create Folder