compass.utilities.logs.LocationFileLog#
- class LocationFileLog(listener, log_dir, location, level='INFO', max_teardown_time=30)[source]#
Bases:
objectContext manager to write logs for a location to a unique file
- Parameters:
listener (
LogListener) – 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".max_teardown_time (
intorfloat, default30) – Max number of seconds to wait for logs to flush to file before unhooking the handler from the queue listener. By default,30.
Methods
Attributes
Number of seconds to wait between async log flush checks
Formatter used for text logs
- TEXT_FORMATTER = <logging.Formatter object>#
Formatter used for text logs
- ASYNC_EXIT_SLEEP_SECONDS = 3#
Number of seconds to wait between async log flush checks