spectre-core 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spectre_core/chunks/factory.py +1 -1
- spectre_core/logging.py +13 -14
- {spectre_core-0.0.2.dist-info → spectre_core-0.0.3.dist-info}/METADATA +1 -1
- {spectre_core-0.0.2.dist-info → spectre_core-0.0.3.dist-info}/RECORD +7 -7
- {spectre_core-0.0.2.dist-info → spectre_core-0.0.3.dist-info}/LICENSE +0 -0
- {spectre_core-0.0.2.dist-info → spectre_core-0.0.3.dist-info}/WHEEL +0 -0
- {spectre_core-0.0.2.dist-info → spectre_core-0.0.3.dist-info}/top_level.txt +0 -0
spectre_core/chunks/factory.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from spectre_core.chunks.base import BaseChunk
|
7
7
|
from spectre_core.file_handlers.configs import CaptureConfig
|
8
8
|
from spectre_core.exceptions import ChunkNotFoundError
|
9
|
-
|
9
|
+
from spectre_core.chunks.chunk_register import chunk_map
|
10
10
|
|
11
11
|
def get_chunk(chunk_key: str) -> BaseChunk:
|
12
12
|
Chunk = chunk_map.get(chunk_key)
|
spectre_core/logging.py
CHANGED
@@ -12,6 +12,7 @@ from typing import Callable, Optional
|
|
12
12
|
import warnings
|
13
13
|
from collections import OrderedDict
|
14
14
|
from datetime import datetime
|
15
|
+
from functools import wraps
|
15
16
|
|
16
17
|
from spectre_core.file_handlers.text import TextHandler
|
17
18
|
from spectre_core.cfg import (
|
@@ -206,17 +207,15 @@ def configure_root_logger(process_type: str,
|
|
206
207
|
|
207
208
|
return log_handler
|
208
209
|
|
209
|
-
|
210
|
-
def log_call(
|
211
|
-
)
|
212
|
-
def
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
return wrapper
|
222
|
-
return decorator
|
210
|
+
|
211
|
+
def log_call(func: Callable) -> Callable:
|
212
|
+
@wraps(func)
|
213
|
+
def wrapper(*args, **kwargs):
|
214
|
+
logger = logging.getLogger(func.__module__) # Automatically get module-level logger
|
215
|
+
try:
|
216
|
+
logger.info(f"Calling the function: {func.__name__}")
|
217
|
+
return func(*args, **kwargs)
|
218
|
+
except Exception as e:
|
219
|
+
logger.error(f"Error in function: {func.__name__}", exc_info=True)
|
220
|
+
raise
|
221
|
+
return wrapper
|
@@ -2,11 +2,11 @@ spectre_core/__init__.py,sha256=oFSWmGoXQLK5X5xHvWzTdNr9amuaiiGjZirXZVogACU,154
|
|
2
2
|
spectre_core/cfg.py,sha256=_CkQRKRtbkOJmSV58bW4lCsyuRell9dw1lwmirm4Jfc,3175
|
3
3
|
spectre_core/dynamic_imports.py,sha256=hZbFA9QSVUmAA779qrwHe6RylpjeAG_L2KTVrRZE-Qk,987
|
4
4
|
spectre_core/exceptions.py,sha256=i1uLL64DLESdzXTAPTsqc4Yg6LeU-ItOm5rhDlrDv7w,663
|
5
|
-
spectre_core/logging.py,sha256=
|
5
|
+
spectre_core/logging.py,sha256=mdTqHLHXm5ES0nsajy_b7SqT6P2SvMfFfqGg3QOU2F8,6486
|
6
6
|
spectre_core/chunks/__init__.py,sha256=KqEz43Ifjbw_1cMdxt4s7iEUCOGmFruNN63qU2mgcmY,7148
|
7
7
|
spectre_core/chunks/base.py,sha256=lVqVOmI5mxP7JUZ8Gf1VLAQuS3D8q0g7r_ipphxbTBo,5091
|
8
8
|
spectre_core/chunks/chunk_register.py,sha256=sS-T6d59zbh8_trr_7bYlq2O9Ak7k_XXHM6-yalwxaE,435
|
9
|
-
spectre_core/chunks/factory.py,sha256=
|
9
|
+
spectre_core/chunks/factory.py,sha256=gi0x7nsZZR8HUBxnpEfwZG5fI1jSzM2OVPwGR8i45YE,1133
|
10
10
|
spectre_core/chunks/library/__init__.py,sha256=w2G2Ew_yLK1q--1pwN-UsDSSa73Z6VHnn3jC-XXQNWE,272
|
11
11
|
spectre_core/chunks/library/callisto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
spectre_core/chunks/library/callisto/chunk.py,sha256=J_xZIL_9YChLZSK1pMjQZmNoUpcENPXeLlu7x7TbPZI,3931
|
@@ -65,8 +65,8 @@ spectre_core/watchdog/library/fixed/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
|
|
65
65
|
spectre_core/watchdog/library/fixed/event_handler.py,sha256=-G8-bdwSk7ggX9m98kt8Hw4tqIdGQnDCVMflgUzuwaM,1439
|
66
66
|
spectre_core/watchdog/library/sweep/event_handler.py,sha256=0PojO-C4xWoJGuuDbp3dI6Xzjc01_rz-H9s1MwDLjB4,2240
|
67
67
|
spectre_core/web_fetch/callisto.py,sha256=qiww6IURqNI0Dg5nc4uT8f4GFagWcapSgYkrBoRVmlg,3627
|
68
|
-
spectre_core-0.0.
|
69
|
-
spectre_core-0.0.
|
70
|
-
spectre_core-0.0.
|
71
|
-
spectre_core-0.0.
|
72
|
-
spectre_core-0.0.
|
68
|
+
spectre_core-0.0.3.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
69
|
+
spectre_core-0.0.3.dist-info/METADATA,sha256=UK6D1klqtxaesSYGEECLm2Rcrt0ZWf9YX9Fq-7v3XwA,42149
|
70
|
+
spectre_core-0.0.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
71
|
+
spectre_core-0.0.3.dist-info/top_level.txt,sha256=-UsyjpFohXgZpgcZ9QbVeXhsIyF3Am8RxNFNDV_Ta2Y,13
|
72
|
+
spectre_core-0.0.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|