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

Add GUAC Version to Logs #1856

Merged
merged 1 commit into from Apr 22, 2024

Conversation

nathannaveen
Copy link
Contributor

@nathannaveen nathannaveen commented Apr 22, 2024

Description of the PR

  • Added GUAC version to logs using a child logger.
  • Version info comes from pkg/version/version.go, set during build by GoReleaser from the Makefile.

Some example logs:

{"level":"info","ts":1713797532.8228843,"caller":"helpers/bulk.go:192","msg":"assembling HasSBOM: 1","guac-version":"v0.5.2-37-gd95860c0-dirty","documentHash":"sha256:91089ed71548f8092f2a6e18451195537708341d60ff101322b550574119dcf4"}
{"level":"info","ts":1713797532.8232749,"caller":"helpers/bulk.go:203","msg":"assembling VEX : 0","guac-version":"v0.5.2-37-gd95860c0-dirty","documentHash":"sha256:91089ed71548f8092f2a6e18451195537708341d60ff101322b550574119dcf4"}
{"level":"info","ts":1713797532.8232844,"caller":"helpers/bulk.go:209","msg":"assembling HashEqual : 0","guac-version":"v0.5.2-37-gd95860c0-dirty","documentHash":"sha256:91089ed71548f8092f2a6e18451195537708341d60ff101322b550574119dcf4"}
{"level":"info","ts":1713797532.823289,"caller":"helpers/bulk.go:215","msg":"assembling PkgEqual : 0","guac-version":"v0.5.2-37-gd95860c0-dirty","documentHash":"sha256:91089ed71548f8092f2a6e18451195537708341d60ff101322b550574119dcf4"}

PR Checklist

  • All commits have a Developer Certificate of Origin (DCO) -- they are generated using -s flag to git commit.
  • All new changes are covered by tests
  • If GraphQL schema is changed, make generate has been run
  • If OpenAPI spec is changed, make generate has been run
  • If collectsub protobuf has been changed, make proto has been run
  • All CI checks are passing (tests and formatting)
  • All dependent PRs have already been merged

Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

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

Minor typos, but LGTM

pkg/logging/logger.go Outdated Show resolved Hide resolved
pkg/logging/logger.go Outdated Show resolved Hide resolved
- Added GUAC version to logs using a child logger.
- Version info comes from `pkg/version/version.go`, set during build by GoReleaser from the Makefile.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
@kodiakhq kodiakhq bot merged commit c0e35bf into guacsec:main Apr 22, 2024
8 checks passed
arorasoham9 pushed a commit to arorasoham9/guac that referenced this pull request May 17, 2024
- Added GUAC version to logs using a child logger.
- Version info comes from `pkg/version/version.go`, set during build by GoReleaser from the Makefile.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: Soham Arora <arorasoham9@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants