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

Padding in function of the maximum level length at the Transport level. #431

Closed
wants to merge 1 commit into from

Conversation

mathieumg
Copy link

This is an attempt to address #352.

  • Transport.levelPadLength is set directly on the Transport instance, if you would rather I make a setter (Transport.prototype.setLevelPadLength) I have no problem with that, but I didn't see any setters so I didn't create one.
  • I updated the provided Transports to use this, and it is somewhat backwards compatible with third-party Transports in the sense that they won't break or crash, but will act as if Logger.options.padLevels was ignored.
  • It seems that the tests do not strictly validate the raw output of the log calls, but are rather provided a mean to validate the message content. Hence, I did not write any test.

Let me know if there is anything to modify or if you want to discuss the approach!

Thank you

@indexzero
Copy link
Member

Thank you for your contribution. Given the stylistic nature of this change we are going to reject your pull-request. This will be possible soon (and much simpler) via custom formatters.

@indexzero indexzero closed this Sep 30, 2014
@paulhroth paulhroth mentioned this pull request May 26, 2015
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