objwatch.config module¶
- class objwatch.config.ObjWatchConfig(targets: List[str | ModuleType], exclude_targets: List[str | ModuleType] | None = None, with_locals: bool = False, with_globals: bool = False, output: str | None = None, output_json: str | None = None, level: int = 10, simple: bool = True, wrapper: Any | None = None, framework: str | None = None, indexes: List[int] | None = None)[source]¶
Bases:
objectConfiguration parameters for ObjWatch.
- Parameters:
targets (
List[Union[str, ModuleType]]) – Files or modules to monitor.exclude_targets (
Optional[List[Union[str, ModuleType]]]) – Files or modules to exclude from monitoring.with_locals (
bool) – Enable tracing and logging of local variables within functions.with_globals (
bool) – Enable tracing and logging of global variables across function calls.output (
Optional[str]) – File path for writing logs, must end with ‘.objwatch’ for ObjWatch Log Viewer extension.output_json (
Optional[str]) – JSON file path for writing structured logs.level (
int) – Logging level (e.g., logging.DEBUG, logging.INFO).simple (
bool) – Defaults to True, disable simple logging mode with the format “[{time}] [{level}] objwatch: {msg}”.wrapper (
Optional[ABCWrapper]) – Custom wrapper to extend tracing and logging functionality.framework (
Optional[str]) – The multi-process framework module to use.indexes (
Optional[List[int]]) – The indexes to track in a multi-process environment.
- targets: List[str | ModuleType]¶
- exclude_targets: List[str | ModuleType] | None = None¶
- to_dict() Dict[str, Any][source]¶
Convert the configuration object to a dictionary representation.
- Returns:
A dictionary containing all configuration fields.
- Return type:
Dict[str, Any]
- __init__(targets: List[str | ModuleType], exclude_targets: List[str | ModuleType] | None = None, with_locals: bool = False, with_globals: bool = False, output: str | None = None, output_json: str | None = None, level: int = 10, simple: bool = True, wrapper: Any | None = None, framework: str | None = None, indexes: List[int] | None = None) None¶