-
Notifications
You must be signed in to change notification settings - Fork 45
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
Customise logs format #63
Comments
If you're willing to consider this, I'm happy to give it a go, although it's been over 10 years since I wrote any python 🐍. I'm thinking something like: assuming the incoming log from the API is standard format, parse it with a regular expression and combine that with configured settings to output the desired prefix. |
Sorry about that. Yeah, the logging is definitely verbose, but we figured it was better to have too much information than not enough. Would it be sufficient to just pipe the output through another program to trim the output? For example, For example, sometimes I'll do this
|
Thanks for the pipe suggestion, that works well. I thought it might be helpful to include the functionaly as part of the cli for the benefit of others, but happy to use a local alias. |
I think it could make sense to keep the log format trimmed by default with a verbose option to show the full lines. Would you be willing to implement something like that? |
It would be nice to be able to customize the output of the
logs
command. Right now, there is a lot of duplicated data before any meaningful log is printed, which means it's not possible to view the logs nicely in any standard-width terminal window. For example:2020-05-21T07:33:04.257862+00:00 funky-slugggy-name[funky-slugggy-name-1231231231-dgdfgg]: web.1 |
actual app log goes hereAny app using a logging framework will also include a timestamp at the start of the log statement, which means the timestamp is logged twice in that case too.
My screen fits 238 characters, and 110 of those (46%) are the prefix.
The text was updated successfully, but these errors were encountered: