configure_file_logging

jaxrens.cli.run.configure_file_logging(*, working_dir, prefix, level, mode='w')[source]

Attach a file handler to the jaxrens logger.

Writes to a single <working_dir>/<prefix>.log. The threshold follows level: INFO+ normally, DEBUG+ when level is debug (so debug output lands in the same file — there is no separate .debug.log).

mode mirrors the writer_mode plumbed 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_run hoists this before the resolver so resolver-phase logs (which can take many minutes on heavy backends) reach the file from second 1. Direct callers of run_*_from_config (tests, scripts) may call this themselves if they want file output.

Parameters:
Return type:

None