You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 10.0.8 it is possible for developers to add additional JSON fields when creating log messages.
Example:
$this->logger->info('Entity {entityName} has changed state to {newState}', [
'app' => 'myapp',
// these are used for text substitution in the above message
'entityName' => 'X',
'newState' => 'state2',
// these will appear as additional JSON fields in the log entries
'extraFields' => [
'entityName' => 'X',
'oldState' => 'state1',
'newState' => 'state2',
'entityOwner' => 'someuser',
],
]);
The text was updated successfully, but these errors were encountered:
As outlined in #292, this change adds two logging examples that document
the ability to log plain text strings, as well as strings that are
interpolated, and the ability to create additional JSON fields when
logging.
Since 10.0.8 it is possible for developers to add additional JSON fields when creating log messages.
Example:
The text was updated successfully, but these errors were encountered: