Could we format logs better?
See original GitHub issueCurrently (working with 0.9.7), if I open Docker container logs in a text reader I see something like
[0mGET /account/customer?restype=container&comp=list [32m200 [0m19.399 ms - 255[0m
Escape chars are so annoying 😦 Could we turn them off?
Also, would be really helpful to print timestamp in some way, e.g. HH:mm:ss.SSS
Thanks a lot!
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top Results From Across the Web
Log Formatting: 7 Best Practices for Readable Log Files | Scalyr
You might argue that a log file should be machine-readable. I whole-heartedly agree with that. Having machine-readable logs enables you to use ...
Read more >What is the best practice for formatting logs? - Stack Overflow
8 Answers 8 · Choosing good internal format of logging. I prefer space delimeted since it works nice with Unix text tools and...
Read more >Tip: Use a Human-Readable Logging Format - Reflectoring
A guide to create a logging format that can be scanned at a single ... Now, we humans are extraordinarily good at recognizing...
Read more >Why JSON is the Best Application Log Format - Loggly
The biggest benefit of logging in JSON is that it's a structured data format. This makes it possible for you to analyze your...
Read more >Log Formats – a (Mostly) Complete Guide - Graylog
If you want more info on how to ship your JSON logs to Graylog and parse them off in a clean and understandable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will start implementing this change in this week
Thanks. I’ll mark this as a good first issue and hopefully somebody can get around to looking at it soon.
We use morgan middleware for the logging, which is documented here: https://github.com/expressjs/morgan
to give you the date and unformatted version like you are asking for, one would need to usesomething like: