Skip to content

docs: how to disable status code coloring in logger middleware#553

Merged
yusukebe merged 4 commits intohonojs:mainfrom
StuartMoncrieff:main
Mar 20, 2026
Merged

docs: how to disable status code coloring in logger middleware#553
yusukebe merged 4 commits intohonojs:mainfrom
StuartMoncrieff:main

Conversation

@StuartMoncrieff
Copy link
Copy Markdown
Contributor

@StuartMoncrieff StuartMoncrieff commented Dec 20, 2024

Added a tip on how to disable status code coloring for the built-in logger's output by setting the NO_COLOR environment variable.

Also added a link to Pino logging middleware for Hono (as an alternative to the built-in logger middleware).

@StuartMoncrieff StuartMoncrieff changed the title docs(middleware/third-party): added a link to Pino logging middleware for Hono docs: how to disable status code coloring in logger middleware Dec 20, 2024
Comment thread docs/middleware/builtin/logger.md Outdated

::: tip

To disable _status code coloring_, you can set a `NO_COLOR` environment variable. This is a common way to disable ANSI color escape codes in logging libraries, and is described at <https://no-color.org/>. Note that CloudFlare Workers do not have a `process.env` object, so will default to plaintext log output.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CloudFlare Workers should be Cloudflare Workers (f is lowercase).

@yusukebe
Copy link
Copy Markdown
Member

Hi @StuartMoncrieff

Thank you for the PR! I've added the comment.

codeOwlAI pushed a commit to codeOwlAI/website that referenced this pull request Jun 29, 2025
@RobinClowers
Copy link
Copy Markdown

This would be a good addition, search brought me here.

@yusukebe
Copy link
Copy Markdown
Member

Sorry. I missed this. Looks good!

@yusukebe yusukebe merged commit 50948a9 into honojs:main Mar 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants