The first (optional) call from the archivist package is to set the logger.

from archivist.logger import set_logger
from archivist.archivist import Archivist

client_id = getenv("DATATRAILS_APPREG_CLIENT")
client_secret_file = getenv("DATATRAILS_APPREG_SECRET_FILENAME")
with open(client_secret_file, mode="r", encoding="utf-8") as tokenfile:
    client_secret = tokenfile.read().strip()

arch = Archivist(
    (client_id, client_secret),

Creates the root logger as a simple console streamer. Follows the Django-style logging configuration where the logging system forms a hierarchy of loggers all potentially independently configurable.

This model allows controlling loggers that are part of the dependency list. For example setting a debug logging level will show debug output from the underlying urllib3 package.

URL: https://docs.djangoproject.com/en/3.2/topics/logging/


Set logging level


level (str) -- Either INFO or DEBUG