aboutsummaryrefslogtreecommitdiff
path: root/pyecsca/misc/cfg.py
diff options
context:
space:
mode:
authorJ08nY2023-10-16 20:11:52 +0200
committerJ08nY2023-10-16 20:11:52 +0200
commita8d60bff6d4c70698cb4145cf1cc53cf215d4ad4 (patch)
tree38f3a278eed73168d59e85438eca6d65cc04f7b0 /pyecsca/misc/cfg.py
parent6e33ca6b07dd09f42949c5f9a3f24e2d87c852e8 (diff)
downloadpyecsca-a8d60bff6d4c70698cb4145cf1cc53cf215d4ad4.tar.gz
pyecsca-a8d60bff6d4c70698cb4145cf1cc53cf215d4ad4.tar.zst
pyecsca-a8d60bff6d4c70698cb4145cf1cc53cf215d4ad4.zip
Diffstat (limited to 'pyecsca/misc/cfg.py')
-rw-r--r--pyecsca/misc/cfg.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/pyecsca/misc/cfg.py b/pyecsca/misc/cfg.py
index ee9c95d..f73eea9 100644
--- a/pyecsca/misc/cfg.py
+++ b/pyecsca/misc/cfg.py
@@ -121,6 +121,12 @@ class ECConfig:
raise ValueError("Bad Mod implementaiton, can be one of 'python', 'gmp' or 'symbolic'.")
self._mod_implementation = value
+@public
+class LoggingConfig:
+ """Logging configuration."""
+
+ enabled: bool = True
+ """Whether logging is enabled."""
@public
class Config:
@@ -128,9 +134,12 @@ class Config:
ec: ECConfig
"""Configuration for the :py:mod:`pyecsca.ec` package."""
+ log: LoggingConfig
+ """Logging configuration."""
def __init__(self):
self.ec = ECConfig()
+ self.log = LoggingConfig()
_config: ContextVar[Config] = ContextVar("config", default=Config())