express-winston icon indicating copy to clipboard operation
express-winston copied to clipboard

Match colorize output with Morgan

Open Hilzu opened this issue 8 years ago • 4 comments

Morgan only colors the status code in the log message according to code, documentation and quick testing. This PR makes the log output when using the colorize option to match it. IMHO this also makes the output a lot more readable because the current setting of grey on black has really low contrast with many color themes.

Hilzu avatar Aug 01 '17 11:08 Hilzu

Awesome, thanks for contributing! I'm happy with this change since it improves contrast and readability.

The only thing I'm worried about is that this is technically a breaking change. I'd love to merge it soon, but I have some more breaking changes in mind for express-winston v3. I think I'm going to hold off for now, but I may end up changing my mind later just to get this in. 🙂

rosston avatar Aug 09 '17 02:08 rosston

Would you also consider matching expressFormat with morgan in v3? Currently it matches the morgan dev format but it's missing content length from the end. I can create a PR if you agree that it should be done.

Hilzu avatar Aug 10 '17 08:08 Hilzu

@Hilzu Sorry, responding very late.

I'm torn on adding the content length to be on by default with expressFormat. I started writing a longer response but ended up deleting it (that's how torn I am).

I'm good with adding content length to expressFormat, but I'm inclined to hold off on that until a v3 release as well. I know it's kind of pedantic, but I don't really want to mess with the log formats of people's files without a major version bump.

rosston avatar Sep 08 '17 01:09 rosston

This is a very old PR. What are we doing with this?

jblevins1991 avatar Mar 07 '20 19:03 jblevins1991