Revert "Add logger"

This reverts commit 068ea6022fdd143e30ddc40b9de37ec383a3ae7d.
This commit is contained in:
CPD 2025-03-12 16:44:38 +01:00
parent 561a946f5b
commit f9b7432f4b

View File

@ -285,7 +285,6 @@ Enter 'help()' for a list of commands""")
args = vars(parser.parse_args())
from os import environ
# Load config file
if path.isfile(cfilename):
config_path = cfilename
elif 'XDG_CONFIG_HOME' in environ.keys():
@ -299,18 +298,6 @@ Enter 'help()' for a list of commands""")
config_file = ConfigFile(config_path, init_values=settings)
load_settings()
# setup logging
log_path = path.expanduser(config_file.get_or("path_log", "~/.cache/cpdctrl-interactive.log"))
makedirs(path.dirname(log_path), exist_ok=True)
logging.basicConfig(
level=logging.WARN,
format="%(asctime)s [%(levelname)s] [%(name)s] %(message)s",
handlers=[
logging.FileHandler(log_path),
logging.StreamHandler()
]
)
if not path.isdir(settings["datadir"]):
makedirs(settings["datadir"])