Bug #1334

Configuring loggers does not work using environment variables.

Added by L. Schillingmann over 11 years ago. Updated over 11 years ago.

Status:ResolvedStart date:01/16/2013
Priority:NormalDue 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

Related to Robotics Systems Commons - Enhancement #1337: Allows to spcify whether the environment variable prefix ... Resolved 01/16/2013
Blocked by Robotics Systems Commons - Enhancement #1336: Make logger names case-insensitive Resolved 01/16/2013

Associated revisions

Revision 9c0e8cfd
Added by J. Wienke over 11 years ago

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

With the resolution for #1336 the specification now works using RSC_RSC_LOGGING* variables. This is still suboptimal with the duplicated RSC prefix. So I will fix this with #1337

#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.

Also available in: Atom PDF