From 597a190065ed23553c8351905803b6b5699c18cd Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 2 May 2017 22:16:52 -0400 Subject: add method to query log output state --- python/log.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'python/log.py') diff --git a/python/log.py b/python/log.py index f09b94a1..850772f1 100644 --- a/python/log.py +++ b/python/log.py @@ -23,6 +23,19 @@ import _binaryninjacore as core +_output_to_log = False + + +def redirect_output_to_log(): + global _output_to_log + _output_to_log = True + + +def is_output_redirected_to_log(): + global _output_to_log + return _output_to_log + + def log(level, text): """ ``log`` writes messages to the log console for the given log level. -- cgit v1.3.1