Bug #1334
Configuring loggers does not work using environment variables.
Status: | Resolved | Start date: | 01/16/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | C++ | |||
Target version: | rsb-0.9 |
Description
The following log message will not be shown, regardless of the shell's environment:
[...] rsb::ListenerPtr listener(Factory::getInstance().createListener(scope)); listener->addHandler(rsb::HandlerPtr(new rsb::EventQueuePushHandler(eventqueue))); rsc::logging::LoggerPtr logger = rsc::logging::Logger::getLogger("blah"); logger->info("This is a info msg...");
Shell environment:
RSC_LOGGING_BLAH_LEVEL=INFO
Result: Does not work. Varying case does not help either.
rsb.conf:
[rsc.logging] blah.LEVEL=INFO
Result: Does work
Related issues
Associated revisions
Do not strip the prefix of environment variable options for the logging configuration.
This avoid the necessity for RSC_RSC_LOGGING duplication.
refs #1334
History
#1 Updated by J. Wienke over 11 years ago
- Status changed from New to In Progress
#2 Updated by J. Wienke over 11 years ago
This is caused by the fact that the current logging system in RSC is case-sensitive, but option handling from the environment make everything lower-case. See #1336.
#3 Updated by J. Wienke over 11 years ago
#4 Updated by J. Wienke over 11 years ago
- Status changed from In Progress to Resolved
- Target version changed from rsb-0.7 to rsb-0.9
- % Done changed from 0 to 100
This is now completely fixed in master, so that RSC_LOGGING_YOUR_LOGGER_LEVEL=BLA works. However, I had to change interfaces for this to work and some guarantees of the logging system in RSC. Hence, I cannot port this back to 0.7. I hope this is ok.