How to change log format order ?
Heya,
Amazing project. I've started using structlog for all my stuff. This is a really dumb question but I honestly couldn't find it "spelled out" for me anywhere.
I'm trying to change the log format of structlogs. This can be accomplished by a format string using Python's stdlib logger.
Basically my current log output is the following:
2021-12-25 00:08:19 [debug ] running in verbose mode [myapp]
I want to put the logger name before the log level, e.g.:
2021-12-25 00:08:19 [myapp] [debug ] running in verbose mode
How does one accomplish this?
Unfortunately, that's currently not supported. You can copy-paste ConsoleRenderer from dev.py and just adjust the order in there. :)
gotchu. Thanks for the response!
@hynek I wonder if you are interested in this feature. I'd like to invest some time here.
I think this is a bit more complicated than it sounds, because it interacts with #341 and should be tackled together.
I'm thinking something like [Column("timestamp", foreground="green", background="violet"), Column("event", ...)]
Please everyone interested, look/comment at/on #577.