Skip to content

Commit

Permalink
fix(ZMS) tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasAFink authored Jan 24, 2025
1 parent 8b9b2b2 commit 0fe45d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zmsslim/src/Slim/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,11 @@ protected function configureLogger(string $level, string $identifier): void
$handler = new StreamHandler('php://stderr', $level);

$formatter = new JsonFormatter();
$formatter->setDateFormat('Y-m-d\TH:i:sP');

// Add processor to format time_local first
App::$log->pushProcessor(function ($record) {
return array(
'time_local' => $record['datetime']->format('Y-m-d\TH:i:sP'),
'time_local' => (new \DateTime())->format('Y-m-d\TH:i:sP'),
'client_ip' => $_SERVER['REMOTE_ADDR'] ?? '',
'remote_addr' => $_SERVER['HTTP_X_FORWARDED_FOR'] ?? $_SERVER['REMOTE_ADDR'] ?? '',
'remote_user' => '',
Expand Down

0 comments on commit 0fe45d6

Please sign in to comment.