Tasks #1629

Let logging system use factory instead of registry

Added by J. Wienke almost 7 years ago. Updated over 2 years ago.

Status:ResolvedStart date:09/13/2013
Priority:NormalDue date:
Assignee:J. Moringen% Done:

0%

Category:Logging
Target version:Robotics Service Bus - rsb-0.18

Description

To prepare for deprecating the registry, let the logging system use factory instead of registry.


Related issues

Blocks Robotics Systems Commons - Enhancement #1621: Deprecate and later remove Registry Resolved 09/10/2013

Associated revisions

Revision 215d6233
Added by J. Moringen over 2 years ago

Logging sub-system no longer uses registry in src/rsc/logging/*.{h,cpp}

fixes #1629

A new class LoggingSystemFactory is now responsible for managing known
LoggingSystem implementation as well as creating instances of
those. The built-in logging systems are initially registered in
LoggingSystemFactory's constructor.

  • src/rsc/logging/LoggingSystem.{h,cpp} (includes): removed
    ../misc/Registry.h
    (LoggingSystem::getRegistryKey): removed member function; no longer
    needed
    (LoggingSystem::getName): new member function; return name of the
    logging system
    (loggingSystemRegistry): removed; no longer needed
  • src/rsc/logging/LoggingSystemFactory.{h,cpp}: new files; singleton
    factory for managing and instantiating LoggingSystem implementations
  • src/rsc/logging/ConsoleLoggingSystem.{h,cpp} (includes): removed
    ../misc/Registry.h; added ../runtime/Properties.h
    (ConsoleLoggingSystem::getRegistryKey): removed; no longer needed
    (ConsoleLoggingSystem::create): new static member function; create
    function for use by LoggingSystemFactory
  • src/rsc/logging/LoggerFactory.{h,cpp} (includes): removed
    ConsoleLoggingSystem.h; added LoggingSystemFactory.h
    (toplevel): adapted documentation comment w.r.t. logging system
    implementation registration
    (LoggerFactory::DEFAULT_LOGGING_SYSTEM): just use "console"
    (LoggerFactory::reselectLoggingSystem): use LoggingSystemFactory
    (LoggerFactory::getLoggingSystemName): use LoggingSystem::getName
  • test/rsc/logging/mocks.h (includes): added rsc/runtime/Properties.h
    (MockLoggingSystem::name): removed; no longer needed
    (MockLoggingSystem::MockLoggingSystem): likewise
    (MockLoggingSystem::getRegistryKey): likewise
    (MockLoggingSystem::getName): new member function; required by
    interface
    (MockLoggingSystem::create): new static member function; required by
    LoggingSystemFactory
  • test/rsc/logging/LoggerFactoryTest.cpp (includes): added
    rsc/logging/LoggingSystemFactory.h
    (test LoggerFactoryTest::testReselectLoggingSystem): adapted but
    disabled since it didn't work
    (test LoggerFactoryTest::testRootLoggerCorrectLevelAfterReselect):
    adapted
  • test/rsc/logging/OptionBasedConfiguratorTest.cpp (includes): added
    rsc/logging/LoggingSystemFactory.h
    (test OptionBasedConfigurationTest::testSystemSelection): adapted
    but disabled since it didn't work

History

#1 Updated by J. Moringen over 6 years ago

  • Target version changed from rsb-0.10 to rsb-0.11

#2 Updated by J. Moringen over 6 years ago

  • Target version changed from rsb-0.11 to rsb-0.12

#3 Updated by J. Wienke over 5 years ago

  • Target version changed from rsb-0.12 to rsb-1.0

#4 Updated by J. Wienke about 4 years ago

  • Assignee deleted (J. Wienke)

#5 Updated by J. Moringen over 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#6 Updated by J. Moringen over 2 years ago

  • Assignee set to J. Moringen
  • % Done changed from 100 to 0

#7 Updated by J. Moringen over 2 years ago

  • Target version changed from rsb-1.0 to rsb-0.18

Also available in: Atom PDF