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

Feature/log formatting #84

Merged
merged 12 commits into from
Mar 10, 2023
Merged

Feature/log formatting #84

merged 12 commits into from
Mar 10, 2023

Conversation

ellisonc
Copy link

@ellisonc ellisonc commented Mar 9, 2023

Description

Updated common library with support for json logs and a better interface for logging the app binary and version

Migration Guide

Previously cli applications were created by calling entrypoint.NewApp(), then the application name and version were set after the fact for both the logging and the CLI description.
The new way to do this is a single call to entrypoint.NewApp(name, version)

Calling logging.GetLogger(name, version) will now return a logrus Entry instead of a logrus Logger. This entry has the name and version preset.

The behavior of the default logger is the same as in previous versions of go-commons.

A new JSON logger is available by calling logging.SetGLobalLogFormatter("json")

Copy link
Contributor

@MoonMoon1919 MoonMoon1919 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed live w/ Andrew on a code-pairing call.

LGTM!

@ellisonc ellisonc merged commit 6fcd21e into master Mar 10, 2023
@ellisonc ellisonc deleted the feature/log-formatting branch March 10, 2023 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants