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

Feature request: re-order output columns without explicitly defining them #622

Open
jwuerzinger opened this issue May 24, 2024 · 1 comment

Comments

@jwuerzinger
Copy link

jwuerzinger commented May 24, 2024

Following up on #388, it would be really nice to add an option to reorder columns without having to explicitly define colours etc.

I.e. changing sth like this:

 2021-12-25 00:08:19 [debug    ] running in verbose mode        [myapp]

into e.g.

 2021-12-25 00:08:19 [myapp] [debug    ] running in verbose mode

with e.g. something like:

processors=structlog.get_config()["processors"]
processors[-1].reorder_columns([0, 3, 1, 2])
structlog.configure( processors=processors )
@hynek
Copy link
Owner

hynek commented May 27, 2024

I guess you can do that by mangling processors[-1]._columns for now.

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

2 participants