Skip to content

Commit

Permalink
Fix EnvVarProcessor and don't rely on getenv() to get env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Nov 7, 2023
1 parent e58392e commit 1e93744
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EnvVarProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function process(LogRecord $record): LogRecord
$record['extra']['env'] = [];

foreach ($this->vars as $var) {
$record['extra']['env'][$var] = \getenv($var) ?? $_ENV[$var] ?? $_SERVER[$var] ?? null;
$record['extra']['env'][$var] = $_ENV[$var] ?? $_SERVER[$var] ?? null;
}

return $record;
Expand Down

0 comments on commit 1e93744

Please sign in to comment.