Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: remove configuration remnants from old logging system #6673

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions gnuradio-runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ if(ENABLE_GNURADIO_RUNTIME)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-runtime.conf
DESTINATION ${GR_PREFSDIR})

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/gr_log_default.conf
DESTINATION ${GR_PREFSDIR})

set(PC_ADD_CFLAGS ${MPLIB_PC_ADD_CFLAGS})

########################################################################
Expand Down
9 changes: 3 additions & 6 deletions gnuradio-runtime/gnuradio-runtime.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ max_messages = 8192
#buffer_size = 32768

[LOG]
# Levels can be (case insensitive):
# DEBUG, INFO, WARN, TRACE, ERROR, ALERT, CRIT, FATAL, EMERG
# levels, in ascending order of severity:
# trace, debug, info, warning, error, critical, off
log_level = info
debug_level = emerg
debug_level = critical
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change in particular has caused a bit of trouble, because GNU Radio prior to version 3.10 raises an exception when it encounters an unknown log level, and critical is not in the list:

void logger_set_level(logger_ptr logger, const std::string& level)
{
std::string nocase = level;
std::transform(level.begin(), level.end(), nocase.begin(), ::tolower);
if (nocase == "off" || nocase == "notset")
logger_set_level(logger, log4cpp::Priority::NOTSET);
else if (nocase == "all" || nocase == "debug")
logger_set_level(logger, log4cpp::Priority::DEBUG);
else if (nocase == "info")
logger_set_level(logger, log4cpp::Priority::INFO);
else if (nocase == "notice")
logger_set_level(logger, log4cpp::Priority::NOTICE);
else if (nocase == "warn")
logger_set_level(logger, log4cpp::Priority::WARN);
else if (nocase == "error")
logger_set_level(logger, log4cpp::Priority::ERROR);
else if (nocase == "crit")
logger_set_level(logger, log4cpp::Priority::CRIT);
else if (nocase == "alert")
logger_set_level(logger, log4cpp::Priority::ALERT);
else if (nocase == "fatal")
logger_set_level(logger, log4cpp::Priority::FATAL);
else if (nocase == "emerg")
logger_set_level(logger, log4cpp::Priority::EMERG);
else
throw std::runtime_error("logger_set_level: Bad level type.");
}

Gqrx's AppImage releases are presently built on top of GNU Radio 3.8, and they fail to start if GNU Radio 3.10.7.0 or later is installed: gqrx-sdr/gqrx#1316

I'll probably resolve this by updating the AppImage to use GNU Radio 3.10, but I wanted to note the problem here in case other users with multiple GNU Radio versions run into the same problem.


# These file names can either be 'stdout' to output to standard output
# or 'stderr' to output to standard error. Any other string will
Expand All @@ -26,9 +26,6 @@ debug_level = emerg
log_file = stdout
debug_file = stderr

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


[PerfCounters]
on = False
Expand Down
19 changes: 0 additions & 19 deletions gnuradio-runtime/gr_log_default.conf

This file was deleted.