Also useful:
https://files.ettus.com/manual/page_logging.html

Wade

On Fri, Jun 4, 2021 at 8:54 AM Wade Fife <wade.f...@ettus.com> wrote:

> The documentation for the C API log function is here:
>
>
> https://files.ettus.com/manual/log_8h.html#a970e4c6a2fbc9761fd1a4d26dce81544
>
> I haven't used the C API, but the C++ API looks very similar. Normally the
> macros are used to print log messages (e.g., UHD_LOG_TRACE, UHD_LOG_DEBUG,
> UHD_LOG_INFO, etc.). These macros call the underlying _uhd_log() or
> uhd::_log::log() function. If you grep for those macros, you will find many
> examples of how to use them. You'll find more information in log.h and
> log.hpp.
>
>
> https://github.com/EttusResearch/uhd/blob/master/host/include/uhd/utils/log.h
>
> https://github.com/EttusResearch/uhd/blob/master/host/include/uhd/utils/log.hpp
>
> The minimum log level available is defined by the cmake option
> "-DUHD_LOG_MIN_LEVEL" at compile time. The log level can be set at runtime
> by specifying the "UHD_LOG_LEVEL" environment variable. If you want to
> change the log level through the API, you can do that with
> uhd::log::set_log_level(level). There are separate variables and functions
> if you want to change just the file logging or just console logging.
>
> The way I use it is I build UHD with the cmake option
> "-DUHD_LOG_MIN_LEVEL=trace". "trace" is the lowest level, so this makes all
> logging available. (The logging levels are trace, debug, info, warning,
> error, fatal, off.) Then I set an environment variable
> "UHD_LOG_CONSOLE_LEVEL=trace" when I want to show all the log messages at
> runtime in the console, or set it to "info" for the default level of
> messaging. Set it to "off" to disable all log messages.
>
> Thanks,
>
> Wade
>
>
> On Fri, Jun 4, 2021 at 8:03 AM andrew4010 via USRP-users <
> usrp-users@lists.ettus.com> wrote:
>
>> Hello
>>
>> In documentation dont described how to use _uhd_log function in C API.
>>
>> What do the parameters of this function mean?
>>
>> How to control console out with this function?
>>
>> Sample code to completely hide the console log?
>>
>>
>> Thank you
>> _______________________________________________
>> USRP-users mailing list -- usrp-users@lists.ettus.com
>> To unsubscribe send an email to usrp-users-le...@lists.ettus.com
>>
>
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-le...@lists.ettus.com

Reply via email to