Wednesday, September 16, 2020

Re: GNU radio logging

Hi, Marcus,
Thanks for your generous help.

[LOG]
# Levels can be (case insensitive):
#       DEBUG, INFO, WARN, TRACE, ERROR, ALERT, CRIT, FATAL, EMERG
log_level = info
debug_level = info

# These file names can either be 'stdout' to output to standard output
# or 'stderr' to output to standard error. Any other string will
# create a file in which to output the logging information. An empty
# string or no value here will ignore this level of configuration
# completely.
log_file = /home/hu/rfid_code/log/log.txt
debug_file = /home/hu/rfid_code/log/debug.txt

# Used for advanced configuration of the logger
#log_config = /usr/local/etc/gnuradio/gr_log_default.xml

I have edited the /usr/local/etc/gnuradio/conf.d/gnuradio-runtime.conf file for logging like above:

I am running a third-party code [RFID] https://github.com/nkargas/Gen2-UHF-RFID-Reader where are a lot of debug log:

/home/hu/rfid/Gen2-UHF-RFID-Reader/gr-rfid/lib/gate_impl.cc:
   56        dc_samples.resize(dc_length);
   57  
   58:       GR_LOG_INFO(d_logger, "T1 samples : " << n_samples_T1);
   59:       GR_LOG_INFO(d_logger, "PW samples : " << n_samples_PW);
   60  
   61:       GR_LOG_INFO(d_logger, "Samples of Tag bit : "<< n_samples_TAG_BIT);
   62:       GR_LOG_INFO(d_logger, "Size of window : " << win_length);
   63:       GR_LOG_INFO(d_logger, "Size of window for dc offset estimation : " << dc_length);
   64:       GR_LOG_INFO(d_logger, "Duration of window for dc offset estimation : " << DC_SIZE_D << " us");
 
However, I still cannot find the log output whether in /home/hu/rfid_code/log/log.txt or in /home/hu/rfid_code/log/log.txt.

By the way, I run on terminal using 
sudo GR_SCHEDULER=STS nice -n -20 python ./reader.py
not in grc, does it affect?

Best,

On Mon, Sep 14, 2020 at 4:50 PM Marcus D Leech <patchvonbraun@gmail.com> wrote:
The config you shared has the messages going to stdout and stderr. 

Further many Gnu Radio blocks don't even
Produce any debugging output at runtime. 

Sent from my iPhone

On Sep 14, 2020, at 6:45 PM, Xiang Ma <marxwolfs@gmail.com> wrote:


There is no output in the configured log file.

On Mon, Sep 14, 2020 at 4:43 PM Marcus D Leech <patchvonbraun@gmail.com> wrote:
Please define "does not work". 



Sent from my iPhone

On Sep 14, 2020, at 6:35 PM, Xiang Ma <marxwolfs@gmail.com> wrote:


Hi,

    I want to print the logging information of the gnuradio. I checked the website https://wiki.gnuradio.org/index.php/Logging, it is kind of outdated. 

hu@hu:~/Documents/marxwolf.github.io$ gnuradio-config-info --version
3.7.14.0
This is the gnuradio version on my Ubuntu 18.04. TO make the logging configuration work in system level, I try to edit vim /usr/local/etc/gnuradio/conf.d/gnuradio-runtime.conf file,

[LOG]
# Levels can be (case insensitive):
#       DEBUG, INFO, WARN, TRACE, ERROR, ALERT, CRIT, FATAL, EMERG
log_level = debug
debug_level = emerg

# These file names can either be 'stdout' to output to standard output
# or 'stderr' to output to standard error. Any other string will
# create a file in which to output the logging information. An empty
# string or no value here will ignore this level of configuration
# completely.
log_file = stdout
debug_file = stderr

# Used for advanced configuration of the logger
#log_config = /usr/local/etc/gnuradio/gr_log_default.xml

I edit the log_level and log_file, but it does not work. And I am not sure why. Please help me.
Best Regards,

Xiang Ma

--
Xiang Ma, Ph.D. Student
College of Engineering
Utah State University


--
Xiang Ma, Ph.D. Student
College of Engineering
Utah State University


--
Xiang Ma, Ph.D. Student
College of Engineering
Utah State University

No comments:

Post a Comment