[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 30/57: runtime: configuring loggers in gr P
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 30/57: runtime: configuring loggers in gr Python module for easy use in Python. |
Date: |
Wed, 21 May 2014 03:10:27 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 9273fca3ee45fdf7c7fdb804a1f3c89aff4d1491
Author: Tom Rondeau <address@hidden>
Date: Mon May 12 12:37:50 2014 -0400
runtime: configuring loggers in gr Python module for easy use in Python.
Can use gr.log.<level>('log message') or gr.log_debug directly from python
to output logging info based on the [LOG] preferences.
---
gnuradio-runtime/python/gnuradio/gr/__init__.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnuradio-runtime/python/gnuradio/gr/__init__.py
b/gnuradio-runtime/python/gnuradio/gr/__init__.py
index 94a5c9e..f093277 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("gr_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("gr_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"))
- [Commit-gnuradio] [gnuradio] 27/57: grc: adding advanced tab feature to set a block's alias., (continued)
- [Commit-gnuradio] [gnuradio] 27/57: grc: adding advanced tab feature to set a block's alias., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 29/57: grc: fixes bug with controlport monitors where true/false enable parameter is not respected., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 02/57: runtime: white space removal., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 31/57: fec: use logger to explain exception when using threading with history., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 26/57: fec: changed puncture block for easier to use API., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 18/57: volk: added conv kernel puppet and added to QA and profile., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 34/57: qtgui: work on ber sink for fecapi, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 35/57: runtime: don't add the log appender --> adds to C++, too., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 43/57: digital: added option to packet_utils.unmake_packet to check or not check the CRC., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 44/57: blocks: adds kernels for pack_k_bits and unpack_k_bits., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 30/57: runtime: configuring loggers in gr Python module for easy use in Python.,
git <=
- [Commit-gnuradio] [gnuradio] 39/57: digital: modified tagged stream correlate access code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 37/57: Revert "blocks: add optional argument to deinterleave and interleave ctors to not set relative rate.", git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 42/57: fec: wip: fixing formatting., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 32/57: blocks: add optional argument to deinterleave and interleave ctors to not set relative rate., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 48/57: fec: wip: adding extended encoder for async version., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 47/57: digital: don't need the FEC info for the tagged stream corr access code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 46/57: blocks: adding an option to swap the order of the output bits of a repack_bits block., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 45/57: fec: wip: using unpack/pack k bits kernels instead of copying logic in here., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 56/57: Merge branch 'fecapi', git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 51/57: Revert "blocks: adding an option to swap the order of the output bits of a repack_bits block.", git, 2014/05/20