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

refactor(logging): improve details in logs #1681

Merged
merged 1 commit into from
Dec 25, 2024
Merged

Conversation

setchy
Copy link
Member

@setchy setchy commented Dec 22, 2024

Should help future us triage/support user issues better

Signed-off-by: Adam Setch <adam.setch@outlook.com>
@setchy setchy added this to the Release 5.18.0 milestone Dec 22, 2024
@github-actions github-actions bot added the refactor Refactoring of existing feature label Dec 22, 2024
@setchy setchy merged commit 5c3f303 into main Dec 25, 2024
18 checks passed
@setchy setchy deleted the refactor/improve-logs branch December 25, 2024 17:40
@bmulholland
Copy link
Collaborator

Almost a nit, but: It'll be easy to forget to do this for future logs. Wrapping it in a logger method that takes a "type" arg or something will help stabilize this practice in the codebase.

Something like

function logError(type, message, err) {
	 log.error(`[${type}]: ${message}`, err);
}

@setchy
Copy link
Member Author

setchy commented Dec 28, 2024

Almost a nit, but: It'll be easy to forget to do this for future logs. Wrapping it in a logger method that takes a "type" arg or something will help stabilize this practice in the codebase.

Something like

function logError(type, message, err) {
	 log.error(`[${type}]: ${message}`, err);
}

Good callout! - #1692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants