-
Notifications
You must be signed in to change notification settings - Fork 0
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
pkg/logger #10
pkg/logger #10
Conversation
Before I review this, I have an important question. Is this flog compatible? :D |
Hehe the JSON variant is, but will add support for our custom syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 2000+ lines of new functionality we could have an rfc.
The description is good in the aspect that it describes what it is. It need a description of why this. Why not any other exsisting plug and play log library?
Have updated the description with this:
Hopefully that answers your wonder. It was quite difficult to split this one up into smaller PRs. An RFC would've been suitable here, yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits and typo corrections from me.
Co-authored-by: Alexamakans <79503481+Alexamakans@users.noreply.github.com>
…re into feature/logging-core
The logging style we added in iver-wharf/wharf-core#10. The JSON logging was already supported, but the pretty logging is from now on also supported. Preview: ![consolepretty](https://user-images.githubusercontent.com/2477952/122565545-e862a880-d046-11eb-965c-9b513e4c7045.jpg)
Co-authored-by: Alexamakans <79503481+Alexamakans@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, forgot these. Sorry.
Co-authored-by: Alexamakans <79503481+Alexamakans@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
For real this time!
Logging! It's finally here!
Took heavy inspiration from https://github.com/rs/zerolog in the architecture and pretty console output.
The code base may seem bloated, but I think it's more readable than zerolog's source code.
Dont be afraid of bashing it even though it has all those pretty comments in it.
Motive
The requested feature set was this:
When coding this I tried to find an existing logger with similar features, and then wrap it inside some abstraction. I then noticed that the concrete implementation is so small so I chose to not depend on any external logging library.
Preview
Sample output of the different pre-packaged
Sink
types.pkg/logger/consolepretty
pkg/logger/consolejson