-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
817e41a
commit d21f6d4
Showing
2 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
""" | ||
|
||
__author__ = "Grzegorz Latuszek, Marcin Usielski, Michal Ernst, Tomasz Krol" | ||
__copyright__ = "Copyright (C) 2018-2022, Nokia" | ||
__copyright__ = "Copyright (C) 2018-2025, Nokia" | ||
__email__ = "[email protected], [email protected], [email protected], [email protected]" | ||
|
||
import gc | ||
|
@@ -18,7 +18,7 @@ | |
from functools import partial, wraps | ||
from types import FunctionType, MethodType | ||
|
||
from moler.config.loggers import get_error_log_stack | ||
from moler.config.loggers import get_error_log_stack, switch_debug_log_visibility | ||
from moler.connection_observer import ConnectionObserver | ||
from moler.exceptions import ExecutionException, MolerException | ||
|
||
|
@@ -135,6 +135,24 @@ def raise_background_exceptions(cls, decorated="function", check_steps_end=False | |
else: | ||
return partial(cls._decorate, check_steps_end=check_steps_end) | ||
|
||
@classmethod | ||
def disable_debug_log(cls): | ||
""" | ||
Disable debug log. | ||
:return: None | ||
""" | ||
switch_debug_log_visibility(disable=True) | ||
|
||
@classmethod | ||
def enable_debug_log(cls): | ||
""" | ||
Enable debug log. | ||
:return: None | ||
""" | ||
switch_debug_log_visibility(disable=False) | ||
|
||
# No public methods and fields below: | ||
|
||
_was_error = False | ||
|