summaryrefslogtreecommitdiff
path: root/lib/debug
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2025-03-25 06:15:33 +0000
committerGitHub <noreply@github.com>2025-03-25 07:15:33 +0100
commitc1759232b42c8926c080006223c382e20b9b2470 (patch)
treeaed2cd8582cb43154619e11949d63b5c84f0dcf8 /lib/debug
parent23dcbd58bc8f26a71b0483ed907c0052ca348899 (diff)
Read sew stack debug information once and re-use (#3604)
Diffstat (limited to 'lib/debug')
-rw-r--r--lib/debug/debug.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/debug/debug.py b/lib/debug/debug.py
index d96dd36d..83e001eb 100644
--- a/lib/debug/debug.py
+++ b/lib/debug/debug.py
@@ -17,12 +17,17 @@ from lxml import etree # to create svg file
from ..svg import line_strings_to_path
from ..svg.tags import INKSCAPE_GROUPMODE, INKSCAPE_LABEL
+from .utils import safe_get
+from ..utils.paths import get_ini
+
import logging
logger = logging.getLogger("inkstitch.debug") # create module logger with name 'inkstitch.debug'
# to log messages if previous debug logger is not enabled
logger_inkstich = logging.getLogger("inkstitch") # create module logger with name 'inkstitch'
+sew_stack_enabled = safe_get(get_ini(), "DEBUG", "enable_sew_stack", default=False)
+
# --------------------------------------------------------------------------------------------
# decorator to check if debugging is enabled