Giter Site home page Giter Site logo

Debug messages about soapysdr HOT 4 CLOSED

pothosware avatar pothosware commented on June 18, 2024
Debug messages

from soapysdr.

Comments (4)

guruofquality avatar guruofquality commented on June 18, 2024

100% of the log messages are making it to the display window. There's a few way to tackle this. This reply is sort of a thought dump at the moment:

SoapySDR Logger

SoapySDR has no log filtering, by default everything goes to the log handler. I think adding an API call to set the log level and an environment variable to also modify the default log level would be a good thing to have.

Pothos SDR log forwarding

At this level, a new log handler is installed to forward the logs into the Poco logging subsystem. This is also how the log messages get around when the blocks are in a different process or host machine.

There is another option in here to implement the same kind of log filtering as mentioned above. In addition, the SDR blocks could have a log level themselves so it would be available in the GUI as a block parameter.

Its better to filter out logs earlier than later. Either this level or in SoapySDR, because after that, and there is unnecessary traffic going into the Poco logging subsystem.

Pothos GUI message window

Currently, there is one logger window and its subscribed to all log messages. We can get very creative here and have multiple tabs for different log sources, or log levels. Or simply add an option to set the log level as a filter. There is an open issue to improve this FWIW: pothosware/PothosFlow#8

Thoughts summary

Ultimately, I want to implement all 3 :-)

But I think it would be good if SoapySDR had a setLogLevel() call. And a default log level that can be modified with an environment variable. In addition, the SDR source and sink block should get an optional drop-down to set the SoapySDR::setLogLevel() that will modify it when specified.

A default log level for SoapySDR would also imply that the current debug message will be hidden by default until the API call to setLogLevel() is made or the env variable is set. I wonder if that will be confusing to users.

from soapysdr.

cjcliffe avatar cjcliffe commented on June 18, 2024

👍 to setLogLevel() for me; bit flags or just a 'level' is fine too. Typically ERROR and WARNING are the only types I see enabled by default for most applications. I was going to just remove/hide those messages once it's fully polished but it's really nice to have the option for end-user debugging purposes.

from soapysdr.

 avatar commented on June 18, 2024

+1 for the setLogLevel()
Agree with Charles that ERROR and WARNING are most commonly used, but we
need to be able to set DEBUG for, well, debugging purposes.

On Wed, Oct 21, 2015 at 1:37 AM, Charles J. Cliffe <[email protected]

wrote:

[image: 👍] to setLogLevel() for me; bit flags or just a 'level' is
fine too. Typically ERROR and WARNING are the only types I see enabled by
default for most applications. I was going to just remove/hide those
messages once it's fully polished but it's really nice to have the option
for end-user debugging purposes.


Reply to this email directly or view it on GitHub
#40 (comment).

from soapysdr.

guruofquality avatar guruofquality commented on June 18, 2024

Codes on master, give it a shot:

 * The default log level threshold is SOAPY_SDR_INFO.
 * Log messages with lower priorities are dropped.
 *
 * The default threshold can be set via the
 * SOAPY_SDR_LOG_LEVEL environment variable.
 * Set SOAPY_SDR_LOG_LEVEL to the string value:
 * "WARNING", "ERROR", "DEBUG", etc...
 * or set it to the equivalent integer value.
/*!
 * Set the log level threshold.
 * Log messages with lower priority are dropped.
 */
SOAPY_SDR_API void SoapySDR_setLogLevel(const SoapySDRLogLevel logLevel);

from soapysdr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.