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

Conversation

marcusmueller
Copy link
Member

I don't thin log4cpp ever reacted to log4j config strings, so this might have never done anything

Signed-off-by: Marcus Müller [email protected]

Description

Related Issue

Which blocks/areas does this affect?

Testing Done

Checklist

I don't thin log4cpp ever reacted to log4j config strings, so this might have never done anything

Signed-off-by: Marcus Müller <[email protected]>
@willcode willcode added the Backport-3.10 Should be backported to 3.10 label May 18, 2023
@willcode willcode merged commit 189d53f into gnuradio:main May 24, 2023
@willcode willcode added ported-to-3.10 Has been ported to 3.10 and removed Backport-3.10 Should be backported to 3.10 labels Jun 3, 2023
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.

@marcusmueller marcusmueller deleted the remove_log4j_remnants branch December 28, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants