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

1174 set log level to debug in golang #1236

Open
wants to merge 6 commits into
base: next
Choose a base branch
from

Conversation

alonsopec89
Copy link
Contributor

Tested manually and seems like works

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Docs updated

@apascal07 apascal07 changed the base branch from main to next November 11, 2024 19:04
@apascal07
Copy link
Collaborator

We want to go through all of the log statements we have today and change non-essential stuff to DEBUG instead of INFO like it is today. We still want to log all of the levels if the right argument is passed.

@alonsopec89 alonsopec89 linked an issue Nov 11, 2024 that may be closed by this pull request
@alonsopec89 alonsopec89 self-assigned this Nov 12, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need the changes in this file?

Copy link
Contributor Author

@alonsopec89 alonsopec89 Nov 12, 2024

Choose a reason for hiding this comment

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

I just moved it to a new file

@@ -26,10 +26,12 @@ import (
func init() {
// TODO: Remove this. The main program should be responsible for configuring logging.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Has this TODO been resolved? How does the log level get configured by the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, It is resolved, the user can set the log level like:

if err := genkit.Init(ctx, &genkit.Options{LogLevel: slog.LevelWarn}); err != nil {
        log.Fatal(err)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[Go] Default logging level should be reduced from INFO to DEBUG
2 participants