Skip to content

Fix: Use log instead of fmt #1706

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

xBlaz3kx
Copy link
Contributor

@xBlaz3kx xBlaz3kx commented Mar 19, 2025

Proposed changes

  • Replaced fmt.Println usages in agent with logs to keep thing consistent

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Comment on lines +16 to +19
log.Infof("Name: %s\n", dkron.Name)
log.Infof("Version: %s\n", dkron.Version)
log.Infof("Codename: %s\n", dkron.Codename)
log.Infof("Agent Protocol: %d (Understands back to: %d)\n",
Copy link
Member

Choose a reason for hiding this comment

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

This is showing the version, it's not logging, so no motivation to use log.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Logrus will also output the version into the console/stdout. This was changed just to make things a bit more consistent

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

View comments

@xBlaz3kx xBlaz3kx requested a review from vcastellm March 27, 2025 22:32
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