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

Rework logging system #248

Merged
merged 2 commits into from
May 28, 2024
Merged

Rework logging system #248

merged 2 commits into from
May 28, 2024

Conversation

Mikescops
Copy link
Member

This PR adds a much needed cleanup of the logging system.

@Mikescops Mikescops requested a review from showi May 28, 2024 13:55
@Mikescops Mikescops self-assigned this May 28, 2024
Copy link
Collaborator

@showi showi left a comment

Choose a reason for hiding this comment

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

nice

@Mikescops Mikescops merged commit 7240493 into master May 28, 2024
1 check passed
@Mikescops Mikescops deleted the platform/rework-logging-system branch May 28, 2024 14:25
@douddle
Copy link

douddle commented May 28, 2024

No way to use builtin Winston winston.format.colorize() ?
like this

@Mikescops
Copy link
Member Author

No way to use builtin Winston winston.format.colorize() ? like this

I first tried using the builtin solution as you suggest but I wasn't happy with how it works with custom logging levels.

For instance on logger.success() I want to display a green check symbol but the colorize() is only looking to make success level string green not anything else.

I need to factorise a bit the code to not have 4 different functions for it tho'

@douddle
Copy link

douddle commented May 29, 2024

There is an opportunity for refactoring using this feature then.
You can customize the message in a custom format as you do. No need of a logger overlay in this case.

@Mikescops
Copy link
Member Author

@douddle If you're up to it, you can make a merge request to this project with your idea, I think it's a good one.

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.

3 participants