elm.ords.utilities.queued_logging.LocationFileLog

class LocationFileLog(listener, log_dir, location, level='INFO')[source]

Bases: object

Context manager to write logs for a location to a unique file.

Parameters:
  • listener (LoggingListener) – A listener instance. The file handler will be added to this listener.

  • log_dir (path-like) – Path to output directory to contain log file.

  • location (str) – Location identifier. For example, "El Paso Colorado". This string will become part of the file name, so it must contain only characters valid in a file name.

  • level (str, optional) – Log level. By default, "INFO".

Methods