From ecd68aec257e786671481210c3f209fd77d97525 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 26 Oct 2021 09:16:35 -0400 Subject: Backward compatible workaround for log import --- python/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index 6b16a463..711ed550 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -39,7 +39,6 @@ from .transform import * from .architecture import * from .basicblock import * from .function import * -from .log import * from .lowlevelil import * from .mediumlevelil import * from .highlevelil import * @@ -67,6 +66,12 @@ from .websocketprovider import * from .workflow import * from .commonil import * from .database import * +# We import each of these by name to prevent conflicts between +# log.py and the function 'log' which we don't import below +from .log import (redirect_output_to_log, is_output_redirected_to_log, + log_debug, log_info, log_warn, log_error, log_alert, + log_to_stdout, log_to_stderr, log_to_file, close_logs) +from .log import log as log_at_level def shutdown(): -- cgit v1.3.1