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

Pad log level so output is more aligned #41

Merged
merged 1 commit into from Dec 7, 2017

Conversation

Projects
None yet
3 participants
@killercup
Copy link
Contributor

killercup commented Dec 7, 2017

This makes the example print this:

TRACE: 2017-12-07T13:44:04Z: default: some trace log
DEBUG: 2017-12-07T13:44:04Z: default: some debug log
 INFO: 2017-12-07T13:44:04Z: default: some information log
 WARN: 2017-12-07T13:44:04Z: default: some warning log
ERROR: 2017-12-07T13:44:04Z: default: some error log
Pad log level so output is more aligned
This makes the example print this:

```
TRACE: 2017-12-07T13:44:04Z: default: some trace log
DEBUG: 2017-12-07T13:44:04Z: default: some debug log
 INFO: 2017-12-07T13:44:04Z: default: some information log
 WARN: 2017-12-07T13:44:04Z: default: some warning log
ERROR: 2017-12-07T13:44:04Z: default: some error log
```
@euclio

This comment has been minimized.

Copy link

euclio commented Dec 7, 2017

I personally prefer the padding on the right side. That's what pretty-env-logger does.

@KodrAus

This comment has been minimized.

Copy link
Collaborator

KodrAus commented Dec 7, 2017

Thanks @killercup! I think aligning the level to the colon is totally fine. I personally agree with @euclio but can't think of a reason why it would be universally better to align the other way.

@KodrAus KodrAus merged commit 9fc2d6c into sebasmagri:master Dec 7, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.