-
-
Notifications
You must be signed in to change notification settings - Fork 512
Open
Description
Steps to reproduce
- Make as new Rails app
- add
config.colorize_logging = false
toconfig/environments/development.rb
- Set up some
.env
files - Start Rails
- Look at the log
Expected behavior
Log messages issued by this gem should respect the colorize_logging value in general, or in this case, not colorize its log output.
Actual behavior
dotenv's initial log messasges are colorized because dotenv loads itself and the .env
files before the Rails configuration has taken place to turn off colorized logging.
[dotenv] Set ^[[36mDATABASE_URL^[[0m
[dotenv] Loaded ^[[33m.env.development^[[0m
System configuration
dotenv version: 3.1.4
Rails version: 8.0.0
Ruby version: 3.3.6
Notes
I don't see a way to tell Rails to avoid colorized logging any earlier.
I can think of two solutions:
- Change these log messages to debug - they don't seem necessary to be at info level
- Change the logging calls to avoid
color
altogether
Maybe there is a better third option I'm not thinking of?
henare
Metadata
Metadata
Assignees
Labels
No labels