[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Enabling GR_LOG messages

From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Enabling GR_LOG messages
Date: Tue, 15 Dec 2015 09:52:30 -0500

On Mon, Dec 14, 2015 at 10:52 AM, Meelis Nõmm <address@hidden> wrote:
Hello everyone,

I'm writing a (test python) block for usrp_source frequency retune. Marcus gave a pretty good base line for the solution in [1]. I figured I can use the message passing to solve this, by using the "time" and "tune" commands [2]. However, now I'm stuck. For what ever reasons the usrp_source (or usrp_block) does not react to the command, sent as a pmt.dict.

I looked it up, the usrp_block_impl.cc file has quite a bit of useful GR_LOG logging implemented, but I cant get it to output to the console when running the python top_block. Read the page about Logging in [3]. Modified the "~/.gnuradio/config.conf" and the gnuradio-runtime.conf to the suggested, but no changes.
log_level = debug
debug_level = debug
log_file = stdout
debug_file = stderr

Does one have to change something in the cmake? Also tried to run the cmake with the -DENABLE_GR_LOG=On option, but it gives a Warning that "Manually-specified variables were not used by the project"

All ideas are welcomed,

[1] https://lists.gnu.org/archive/html/discuss-gnuradio/2015-08/msg00035.html
[2] https://gnuradio.org/doc/doxygen/page_uhd.html
[3] https://gnuradio.org/doc/doxygen/page_logger.html

You can check if your installed version support logging by looking at <prefix>/gnuradio/config.h. You should see lines for "ENABLE_GR_LOG" and "HAVE_LOG4CPP" in this. Both should be defined.

You only really need ENABLE_GR_LOG here, since that defaults to outputting to stdout/stderr. Using log4cpp gives you a lot more flexibility and better formatting of the output.

During cmake time, you should see something like this:

-- Found LOG4CPP: /usr/lib/liblog4cpp.so
-- ENABLE_GR_LOG set to ON.
-- HAVE_LOG4CPP set to True.
-- LOG4CPP_LIBRARIES set to /usr/lib/liblog4cpp.so.

Hope this helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]