right now, logging is kinda implemented, but not necessarily formatted well. Someone could dig into that and make a logging setup which could be used by other ingest scripts.
@exu-112 made this start:
logger = logging.getLogger(__name__)
# Logger setup
# This will stream all logger messages to the standard output and
# apply formatting for that
logger.propagate = False # prevents duplicated logging messages
LOGFORMAT = logging.Formatter(
"%(asctime)s %(levelname)s: %(message)s", datefmt="%m/%d/%Y %I:%M:%S%p"
)
ch = logging.StreamHandler(stream=sys.stdout)
ch.setFormatter(LOGFORMAT)
# To prevent duplicate handlers, only add if they haven't been set previously
if len(logger.handlers) == 0:
logger.addHandler(ch)
logger.setLevel(logging.INFO)
right now, logging is kinda implemented, but not necessarily formatted well. Someone could dig into that and make a logging setup which could be used by other ingest scripts.
@exu-112 made this start: