[Feature Request] Logging config to include `loggers` as well as `root` (suggested solution)
Feature Request
Add a bit of control on logging beyond the root logger
Motivation
Recently had an issue with httpx logs being surfaced. It was annoying because the application was polling a server for job status...
Pitch
Describe the solution you'd like
Allow configs that point to loggers other than root
Describe alternatives you've considered
- Setting up in code in the script, essentially overridding what the nice hydra set up :sob:
- Keeping the root logger as not null and setting handlers to []
Are you willing to open a pull request? (See CONTRIBUTING) Could help if it's as simple as the following!
This line only checks for "root" and could potentially check for other value. For example you may not want the root logger but just the hydra logger https://github.com/facebookresearch/hydra/blob/0f83b0dd6127bf7acb9b31d93e62a7c10b640011/hydra/core/utils.py#L45
could be
if (conf["root"] is not None) or (conf["loggers"] is not None):That way it would support the "loggers" entry of the python logger's config dict schema
Additional context
The logging behaviour/config has brought some negative attitude to some issues, so hopefully it could help with the frustration.
Source: facebookresearch/hydra