Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the NO_COLOR environment variable and improves the behavior of SetDefaultsForClientTools() when output is redirected to non-console destinations. The changes ensure that color output is properly disabled when NO_COLOR is set and that client tool defaults are only applied when actually logging to a console.
- Added
ConsoleLoggingfield toLogConfigto track whether output is going to a terminal - Implemented
NO_COLORenvironment variable support for disabling colors - Modified
SetDefaultsForClientTools()to skip configuration when output is redirected
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| logger.go | Added ConsoleLogging field, implemented NO_COLOR support, and modified SetDefaultsForClientTools() behavior |
| console_logging.go | Updated SetColorMode() to set ConsoleLogging field and modified ColorMode() to use cached value |
| logger_test.go | Added test setup to force console logging mode and updated help text expectations |
| levelsDemo/levels.go | Added explanatory comments about SetDefaultsForClientTools() behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
also
fixes #72