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

Support padding specification in PatternFormatter #3

Open
oktal opened this issue Jan 9, 2021 · 0 comments
Open

Support padding specification in PatternFormatter #3

oktal opened this issue Jan 9, 2021 · 0 comments
Milestone

Comments

@oktal
Copy link
Owner

oktal commented Jan 9, 2021

PatternFormatter should allow to specifiy padding.

For example, the given flag %-5l should right pad the level less than 5 characters long.

Reference of padding specifications that should be supported

Format modifier left justify minimum width maximum width comment
%20n false 20 none Left pad with spaces if the logger name is less than 20 characters long.
%-20n true 20 none Right pad with spaces if the logger name is less than 20 characters long.
%.30n NA none 30 Truncate from the beginning if the logger name is longer than 30 characters.
%20.30n false 20 30 Left pad with spaces if the logger name is shorter than 20 characters. However, if logger name is longer than 30 characters, then truncate from the beginning.
%-20.30n true 20 30 Right pad with spaces if the logger name is shorter than 20 characters. However, if logger name is longer than 30 characters, then truncate from the beginning.
@oktal oktal added this to the 0.1.1 milestone Jan 10, 2021
@oktal oktal modified the milestones: 0.1.1, 0.1.3 May 26, 2021
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

No branches or pull requests

1 participant