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

Colored status token #260

Closed
MatheusFerreira71 opened this issue Jan 12, 2022 · 1 comment
Closed

Colored status token #260

MatheusFerreira71 opened this issue Jan 12, 2022 · 1 comment

Comments

@MatheusFerreira71
Copy link

MatheusFerreira71 commented Jan 12, 2022

When the status token is used to create custom formats, it comes in white on the console.

Take the following example -

morgan.format(
    'custom-format',
    ':method :url :status :response-time ms - :res[content-length] - :user-agent',
  );

The status on the console will be white, no matter the status it returns.

My suggestion is to create a new token :colored-status that comes with the colors that we see on the dev format.

Thanks, hope it helps.

@dougwilson
Copy link
Contributor

Duplicate of #186

Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants