Skip to content

Commit 95a1c81

Browse files
author
arch
committed
add logging flag in config
1 parent 4689d96 commit 95a1c81

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

funscript_editor/config/settings.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ dark_theme: False
3838

3939
# enable the tracking plausiblity check
4040
tracking_plausibility_check: False
41+
42+
# enable logging on windows. logging cause some problems on windows only enable for debugging.
43+
logging: False

funscript_editor/utils/logging.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import logging.config
99

1010
from funscript_editor.definitions import WINDOWS_LOG_CONFIG_FILE, LINUX_LOG_CONFIG_FILE
11+
from funscript_editor.utils.config import SETTINGS
12+
1113

1214
def create_log_directories(config: dict) -> None:
1315
""" create all log directories for a log configuration
@@ -115,7 +117,10 @@ def getLogger(name) -> LoggerInterface:
115117
name (str): name of the logger instance
116118
"""
117119
if platform.system() == 'Windows':
118-
return DevZeroLogger(name)
120+
if SETTINGS['logging']:
121+
return PythonLogger(name)
122+
else:
123+
return DevZeroLogger(name)
119124
else:
120125
return PythonLogger(name)
121126

0 commit comments

Comments
 (0)