Skip to content

Support padding specification in PatternFormatter #3

@oktal

Description

@oktal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions