Varala,

you only need to add a logging backend if you want the log message to go
somewhere other than stderr or a log file.

The 'console logger' means 'stderr'. So, just grab your stderr output if
you want to have those log messages. You can control the console log level
with the UHD_LOG_LEVEL and UHD_LOG_CONSOLE_LEVEL env vars (values are
trace, debug, info, warning, error).

See also the manual:
http://files.ettus.com/manual/log_8hpp.html#loghpp_logging

-- Martin

On Tue, Jan 1, 2019 at 10:31 PM Varala Sathish via USRP-users <
usrp-users@lists.ettus.com> wrote:

> Hi usrp users,
> I am trying to process the UHD log messages in uhd version 3.11.1.0.
> 1. Do we need to add a logging backend using add_logger if we want to
> process the log messages or can we use console logger ? If yes,How to
> access the logging messages from console logger?
>
> I haven't understood  clearly from documentation or from the log_test.cpp
> file to access the log messages. I tried to use add_logger as shown below
>
> static void my_function(uhd::log::logging_info &msg){
> ...
> ...
> }
>
>
> main function{
> ....
> uhd::log::add_logger("key",&my_function);
> ....
> }
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to