facebookresearch / hydra

Hydra is a framework for elegantly configuring complex applications
https://hydra.cc
MIT License
8.66k stars 623 forks source link

[Bug] Colorlog plugin generates `.log` file in cwd instead of output dir #2241

Open ashleve opened 2 years ago

ashleve commented 2 years ago

🐛 Bug

I'm using hydra v1.2 with chdir set to false.

When I don't use colorlog plugin, the .log file with python logs gets generated in my output directory (as expected).

But when I attach colorlog plugin with:

defaults:
    - override hydra/hydra_logging: colorlog
    - override hydra/job_logging: colorlog

The .log file gets generated in current working directory

Checklist

Expected Behavior

I would expect the .log file to be always saved in output directory by default.

System information

Jasha10 commented 2 years ago

Thanks for the bug report @ashleve!

jieru-hu commented 2 years ago

thanks for reporting @ashleve we need to update the colorlog config here https://github.com/facebookresearch/hydra/blob/main/plugins/hydra_colorlog/hydra_plugins/hydra_colorlog/conf/hydra/job_logging/colorlog.yaml#L25