mlwiz.log
log.logger
Minimal file-based logging helper.
Defines Logger, which writes line-oriented logs to disk.
- class mlwiz.log.logger.Logger(filepath, mode, debug)
Bases:
objectProvide minimal file-based logging utilities.
- Parameters:
filepath (str) – Path to the file to write.
mode (str) – File open mode:
'w'(truncate on each write) or'a'(append).debug (bool) – Debug flag stored on the instance. This class does not currently branch on it, but callers may use it to decide whether to emit logs.
- log(content)
Write a single line to the configured log file.
- Parameters:
content (str) – Line content to write. A trailing newline is added.
- Side effects:
Writes to disk using
self.mode. Note thatmode='w'will truncate the file on every call to this method.