Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev] Extra logging fields #292

Closed
PVince81 opened this issue May 22, 2018 · 2 comments
Closed

[dev] Extra logging fields #292

PVince81 opened this issue May 22, 2018 · 2 comments

Comments

@PVince81
Copy link
Contributor

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',
			],
		]);
@mmattel
Copy link
Contributor

mmattel commented Jun 6, 2018

master of 31121 owncloud/core#31135

@settermjd settermjd transferred this issue from owncloud-archive/documentation Nov 19, 2018
@settermjd settermjd self-assigned this Oct 28, 2019
@settermjd settermjd added the work in progress Still in development. Not to be merged. label Oct 28, 2019
@settermjd
Copy link
Contributor

Backport to 10.1-3

settermjd added a commit that referenced this issue Oct 28, 2019
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.
@settermjd settermjd added waiting on feedback and removed work in progress Still in development. Not to be merged. labels Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants