summaryrefslogtreecommitdiff
path: root/python/log.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-06-23 18:36:37 -0400
committerRusty Wagner <rusty@vector35.com>2017-06-23 18:36:37 -0400
commitc51f3bed6bdef577253feee0e85a71fda1931bd7 (patch)
tree1cf26ff28e0b9bfb6bfbed044ba7ca520d63f862 /python/log.py
parent4b988c0d24c8d8c8dc67485f3aaeb7106eb4af18 (diff)
parentcca0fe6ea60eb7f6b35cc433a6fff96cc65b3ff8 (diff)
Merge branch 'dev'
Diffstat (limited to 'python/log.py')
-rw-r--r--python/log.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/python/log.py b/python/log.py
index 45adb4aa..f7144183 100644
--- a/python/log.py
+++ b/python/log.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2015-2016 Vector 35 LLC
+# Copyright (c) 2015-2017 Vector 35 LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
@@ -23,11 +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.