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

Getting of incorrect frame depth during logging fixed #2383

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

k0taperk0t
Copy link
Contributor

@k0taperk0t k0taperk0t commented Oct 9, 2023

Change Overview

With this change instead of

{"File":"pkg/log/log.go","Function":"github.com/kanisterio/kanister/pkg/log.Print","Line":165,"app":"mongo","cluster_name":"85854027-f7b2-41e5-a820-92177102961c","hostname":"orbstack","level":"info","msg":"Uninstalling application.","time":"2023-10-09T09:18:02.612923122Z"}

We will get

{"File":"pkg/app/mongodb.go","Function":"github.com/kanisterio/kanister/pkg/app.(*MongoDB).Uninstall","Line":142,"app":"mongo","cluster_name":"85854027-f7b2-41e5-a820-92177102961c","hostname":"orbstack","level":"info","msg":"Uninstalling application.","time":"2023-10-09T09:49:07.884559847Z"}

Thus this PR fixes getting of incorrect frame depth during logging, because of that we logged incorrect path to file and function where log message emitted from.

PR series:

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

@mergify mergify bot merged commit ea2f59f into kanisterio:master Oct 12, 2023
14 checks passed
@k0taperk0t k0taperk0t deleted the fix-logging branch October 12, 2023 13:21
leuyentran pushed a commit that referenced this pull request Oct 18, 2023
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.

2 participants