Skip to content

Commit

Permalink
rolled back log formatting for now
Browse files Browse the repository at this point in the history
  • Loading branch information
enobrev committed Apr 8, 2021
1 parent 5055ce0 commit fa7ab5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "enobrev/php-tools",
"description": "General Tools",
"version": "1.0.2",
"version": "1.0.3",
"type": "library",
"license": "MIT",
"authors": [
Expand Down
5 changes: 3 additions & 2 deletions src/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ private static function initLogger(): Logger {

if (self::$bContained) {
if (self::$bJSONLogs) {
$oFormatter = new LineFormatter("%datetime% %level_name% @cee: %context%\n", DATE_ATOM);
// $oFormatter = new LineFormatter("%datetime% %level_name% @cee: %context%\n", DATE_ATOM); // Requires mmnormalize in rsyslog sidecar
$oFormatter = new LineFormatter("@cee: %context%\n", DATE_ATOM);
} else {
$oFormatter = new LineFormatter("%datetime% %level_name% %extra% %context%\n", DATE_ATOM);
}

$oHandler = new StreamHandler(fopen('php://stdout', 'wb'), Logger::DEBUG);
$oHandler->setFormatter($oFormatter);

self::$oLog->pushHandler($oHandler);
} else {
if (self::$bJSONLogs) {
Expand Down

0 comments on commit fa7ab5a

Please sign in to comment.