mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 11:36:16 +00:00
Move logs to the root of the configuration folder
This commit is contained in:
parent
ee220bacbc
commit
bf083a85ad
1 changed files with 1 additions and 7 deletions
|
@ -135,15 +135,9 @@ class Configuration:
|
||||||
"""
|
"""
|
||||||
Set the logging config
|
Set the logging config
|
||||||
"""
|
"""
|
||||||
logs_path = os.path.join(platformdirs.user_config_dir('onlylegs'), 'logs')
|
|
||||||
|
|
||||||
if not os.path.isdir(logs_path):
|
|
||||||
os.mkdir(logs_path)
|
|
||||||
print("Created logs directory at:", logs_path)
|
|
||||||
|
|
||||||
logging.getLogger('werkzeug').disabled = True
|
logging.getLogger('werkzeug').disabled = True
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
filename=os.path.join(logs_path, 'only.log'),
|
filename=os.path.join(USER_DIR, 'only.log'),
|
||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
datefmt='%Y-%m-%d %H:%M:%S',
|
datefmt='%Y-%m-%d %H:%M:%S',
|
||||||
format='%(asctime)s %(levelname)s %(name)s %(threadName)s : %(message)s',
|
format='%(asctime)s %(levelname)s %(name)s %(threadName)s : %(message)s',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue