diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr/__init__.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/__init__.py b/gnuradio-runtime/python/gnuradio/gr/__init__.py index 94a5c9ec2b..4fc55c68b2 100644 --- a/gnuradio-runtime/python/gnuradio/gr/__init__.py +++ b/gnuradio-runtime/python/gnuradio/gr/__init__.py @@ -48,3 +48,11 @@ from gateway import basic_block, sync_block, decim_block, interp_block # Force the preference database to be initialized prefs = prefs.singleton + +log = gr.logger("log") +log.add_console_appender(prefs().get_string("LOG", "log_level", "off"), 'gr::log %d :%p: %m%n') +log.set_level(prefs().get_string("LOG", "log_level", "notset")) + +log_debug = gr.logger("log_debug") +log_debug.add_console_appender(prefs().get_string("LOG", "debug_level", "off"), 'gr::debug %d :%p: %m%n') +log_debug.set_level(prefs().get_string("LOG", "debug_level", "notset")) |