configure_file_logging¶
- jaxrens.cli.run.configure_file_logging(*, working_dir, prefix, level, mode='w')[source]¶
Attach a file handler to the
jaxrenslogger.Writes to a single
<working_dir>/<prefix>.log. The threshold followslevel: INFO+ normally, DEBUG+ whenlevelisdebug(so debug output lands in the same file — there is no separate.debug.log).modemirrors thewriter_modeplumbed through to the I/O writers:"w"on a fresh run,"a"on restart so the prior run’s diagnostic log is preserved.Should be called once per process, early.
cli._cmd_runhoists this before the resolver so resolver-phase logs (which can take many minutes on heavy backends) reach the file from second 1. Direct callers ofrun_*_from_config(tests, scripts) may call this themselves if they want file output.