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

feat: add zap logger #282

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

hanshal101
Copy link

CLOSES #274
FIXES #274

Description

In this PR I have added a zap logger for the CLI

Additional Information

  • The log looks something like this if run a simple exe after the main.go build
{"level":"fatal","timestamp":"2024-06-27T16:42:37.861+0530","caller":"glide/main.go:44","msg":"💥Glide has finished with error","error":"required flag(s) \"config\" not set","stacktrace":"main.main\n\tH:/glide/main.go:44\nruntime.main\n\tC:/Users/hansh/go/pkg/mod/golang.org/[email protected]/src/runtime/proc.go:271"}

@hanshal101
Copy link
Author

Hey @roma-glushko I have created the PR. This is just a basic example of the logger, can you please explain and elaborate what else we need to add here. Probably you can help me with where to add these loogers in the CLI.

@roma-glushko
Copy link
Member

@hanshal101 Hey Hanshal, zap logger is already configured in the system:
https://github.com/EinStack/glide/blob/develop/pkg/telemetry/logging.go

The goal of #274 is to simplify its usage further across the system by registering a configured instance globally and using it from there everywhere else.

@hanshal101
Copy link
Author

Ohh cool, sorry I mis-understood this

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.

🔧 Simplify logging setup
2 participants