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

Add skip_level_padding to ConsoleRenderer #599

Merged
merged 13 commits into from
Mar 5, 2024

Conversation

begoon
Copy link
Contributor

@begoon begoon commented Feb 22, 2024

Summary

Add skip_level_padding to ConsoleRenderer.

Details

This PR allows switching on and off the padding of the log level with blanks in ConsoleRenderer.

By default, the log level is padded with blanks to the length of the longest log level name. It may look like:

2024-03-15 11:32:29 [info     ] log message 

The skip_level_padding flag allows to output:

2024-03-15 11:33:35 [info] log message

src/structlog/dev.py Outdated Show resolved Hide resolved
src/structlog/dev.py Outdated Show resolved Hide resolved
Copy link
Owner

@hynek hynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/structlog/dev.py Outdated Show resolved Hide resolved
src/structlog/dev.py Outdated Show resolved Hide resolved
src/structlog/dev.py Outdated Show resolved Hide resolved
@hynek hynek enabled auto-merge (squash) March 5, 2024 09:08
@hynek hynek merged commit 0a64815 into hynek:main Mar 5, 2024
16 checks passed
hynek added a commit that referenced this pull request Mar 5, 2024
@begoon begoon deleted the console-level-padding branch March 5, 2024 09:27
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.

None yet

2 participants