diff --git a/Classes/Backend/JSONConsoleLogger.php b/Classes/Backend/JSONConsoleLogger.php index f7a568b..367e411 100644 --- a/Classes/Backend/JSONConsoleLogger.php +++ b/Classes/Backend/JSONConsoleLogger.php @@ -4,7 +4,6 @@ namespace t3n\FlowLog\Backend; -use Google\Cloud\BigQuery\Date; use Neos\Flow\Annotations as Flow; use Neos\Flow\Log\Backend\ConsoleBackend; @@ -62,12 +61,12 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat 'service' => $this->serviceContext['service'], 'version' => $this->serviceContext['version'], 'message' => $message, - 'additionalData' => json_encode($additionalData, JSON_THROW_ON_ERROR), - 'date' => new Date(new \DateTime('now')), + 'additionalData' => $additionalData, + 'date' => (new \DateTime('now'))->format('Y-m-d'), 'datetime' => new \DateTime('now') ]; $output = json_encode($data); - } catch (Exception $e) { + } catch (\Exception $e) { $data = [ 'severity' => $this->severityLabels[LOG_WARNING], 'service' => $this->serviceContext['service'], @@ -80,7 +79,7 @@ public function append(string $message, int $severity = LOG_INFO, $additionalDat ], 'stackTrace' => $e->getTraceAsString() ], - 'date' => new Date(new \DateTime('now')), + 'date' => (new \DateTime('now'))->format('Y-m-d'), 'datetime' => new \DateTime('now') ]; $output = json_encode($data);