autointent.setup_logging#

autointent.setup_logging(level, log_filename=None)#

Set stdout and file handlers for logging autointent internal actions.

The first parameter affects the logs to the standard output stream. The second parameter is optional. If it is specified, then the “DEBUG” messages are logged to the file, regardless of what is specified by the first parameter.

Parameters:
  • level (autointent.custom_types.LogLevel | str) – one of “DEBUG”, “INFO”, “WARNING”, “ERROR”, “CRITICAL”

  • log_filename (pathlib.Path | str | None) – specify location of logfile, omit extension as suffix .log.jsonl will be appended.

Return type:

None