Skip to content

Disable colors in logfile when running in production#121

Merged
DaleMcGrew merged 3 commits into
wevote:developfrom
josephevans:disable_colors_in_log
Mar 13, 2026
Merged

Disable colors in logfile when running in production#121
DaleMcGrew merged 3 commits into
wevote:developfrom
josephevans:disable_colors_in_log

Conversation

@josephevans
Copy link
Copy Markdown
Member

@josephevans josephevans commented Mar 4, 2026

With colors enable, the prod CloudWatch logfiles are littered with ANSI color codes, like '�[0mGET'. , which make it hard to read.

With this change, we check for environment variable NO_COLOR, and if set to '1', we change the logging template that morgan uses to combined, which disables colors.

@josephevans josephevans requested a review from DaleMcGrew March 4, 2026 17:07
@josephevans josephevans marked this pull request as draft March 4, 2026 17:14
@josephevans josephevans marked this pull request as ready for review March 4, 2026 17:29
@DaleMcGrew
Copy link
Copy Markdown
Member

👍

@DaleMcGrew DaleMcGrew merged commit 96335a1 into wevote:develop Mar 13, 2026
@josephevans josephevans deleted the disable_colors_in_log branch March 13, 2026 01:59
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.

2 participants