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

Change log statements to crystal stdlib logging #6

Merged
merged 1 commit into from
Jul 18, 2022
Merged

Conversation

grepsedawk
Copy link
Collaborator

Level can be controlled with LOG_LEVEL=DEBUG

Level can be controlled with LOG_LEVEL=DEBUG
@grepsedawk grepsedawk merged commit 40767f4 into main Jul 18, 2022
@grepsedawk grepsedawk deleted the lumberjack branch July 18, 2022 00:13
@@ -1,4 +1,6 @@
class Rosegold::Clientbound::Chat < Rosegold::Clientbound::Packet
Log = ::Log.for(self)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain why this gets its own log instance but the other packets don't? Just curious.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because you added the [Chat] prefix, this gives the chat a prefix based on the class so we know it's chat (and I deleted [Chat])

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We'll also be able to add formatters for specific ones if we chose, but this was the only one that needed it's own instance for now based on your existing messages

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