added file logging for coretk, using a time rotating logger, added command line arg to choose coretk log level
This commit is contained in:
parent
7cc52f13d6
commit
6aa7d2175d
2 changed files with 11 additions and 5 deletions
|
@ -1,4 +1,3 @@
|
|||
import logging
|
||||
import os
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
|
@ -16,6 +15,7 @@ ICONS_PATH = HOME_PATH.joinpath("icons")
|
|||
MOBILITY_PATH = HOME_PATH.joinpath("mobility")
|
||||
XMLS_PATH = HOME_PATH.joinpath("xmls")
|
||||
CONFIG_PATH = HOME_PATH.joinpath("gui.yaml")
|
||||
LOG_PATH = HOME_PATH.joinpath("gui.log")
|
||||
|
||||
# local paths
|
||||
DATA_PATH = Path(__file__).parent.joinpath("data")
|
||||
|
@ -52,9 +52,7 @@ def copy_files(current_path, new_path):
|
|||
|
||||
def check_directory():
|
||||
if HOME_PATH.exists():
|
||||
logging.info("~/.coretk exists")
|
||||
return
|
||||
logging.info("creating ~/.coretk")
|
||||
HOME_PATH.mkdir()
|
||||
BACKGROUNDS_PATH.mkdir()
|
||||
CUSTOM_EMANE_PATH.mkdir()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue