This project is archived and is in readonly mode.
config.log_level is ignored when setting a custom logger
-
Matt Jones
- State changed from new to invalid
This is the expected behavior - if you're setting config.logger explictly, Rails uses whatever you're passing in without further configuration.
-
Andrew Vit
In that case, wouldn't it make sense to remove/deprecate config.log_level in favour of setting it directly on the logger object via config.logger.level=... ?
The way it currently works just adds confusion.
-
Matt Jones
If you're using the standard logger, config.logger.level= will blow up (NoMethodError on nil), as the logger doesn't exist yet when the environment is being loaded. (it gets set up in initialize_logger)