accelmo.fitting.worker_logging¶
Worker-process logging: a file per worker, with WARNING and above relayed to the parent.
- accelmo.fitting.worker_logging.WORKER_LOG_PATH = PosixPath('workers/python.log')¶
Where a run’s workers log by default, relative to its run log directory.
- accelmo.fitting.worker_logging.RELAY_LEVEL = 30¶
Records at this level and above reach the parent’s loggers (and so its dashboard).
- accelmo.fitting.worker_logging.start_relay()[source]¶
Start relaying worker records into this process’s loggers; call before forking workers.
- Return type:
None
- accelmo.fitting.worker_logging.attach_in_worker(logfile, level)[source]¶
Replace this worker’s inherited handlers by a relay and, with
logfile, a file atlevel.Does nothing outside a child process, so a worker run in-process leaves the logging alone.
- Return type:
None- Parameters:
logfile (Path | None)
level (int)