Skip to content

Commit 7ccff0d

Browse files
committed
minor changes based on code review
1 parent 5cac6ff commit 7ccff0d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

application/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
config = yaml.safe_load(config_file.read())
3333

3434
config['handlers']['timedRotatingFile']['filename'] = paths.LOG_FILE_PATH
35-
paths.makedir_if_not_exists(paths.LOGS_DIR_PATH)
3635
logging.config.dictConfig(config)
3736
except Exception:
3837
# Fallback to a basic configuration

application/paths.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ def makedir_if_not_exists(path):
4040
PRIVATE_KEY_PATH = os.path.join(PROFILE_PATH, "private_keys")
4141
makedir_if_not_exists(PRIVATE_KEY_PATH)
4242
LOGS_DIR_PATH = os.path.join(PROFILE_PATH, 'logs')
43+
makedir_if_not_exists(LOGS_DIR_PATH)
4344
LOG_FILE_PATH = os.path.join(LOGS_DIR_PATH, 'ictrl_log.log')

log_config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ handlers:
1818
formatter: default
1919
when: H
2020
interval: 3
21+
# See discussion on backupCount decision: https://github.com/junhaoliao/iCtrl/pull/46/files/0c148d0e47dc9ae42014f10a4a04e0aaffca7cbd#r1921487166
2122
backupCount: 112
22-
# filename: dynamically assigned upon the initialization of the program
23+
# filename: To be dynamically assigned upon application initialization.
2324

2425
root:
2526
level: DEBUG

0 commit comments

Comments
 (0)