16 lines
306 B
Python
16 lines
306 B
Python
import os
|
|
import logging
|
|
|
|
# Setup logging
|
|
def setup_log():
|
|
"""
|
|
Setup logging
|
|
"""
|
|
loglevel = 10 if os.getenv("APKG_TARGET") == "debug" else 20
|
|
|
|
logging.basicConfig(
|
|
format="%(asctime)s %(levelname)s %(message)s",
|
|
datefmt="%Y-%m-%d %H:%M:%S",
|
|
level=loglevel
|
|
)
|