BloombergLP::ball::LoggerManager::initSingleton

initSingleton overloads

Synopses

Declared in <ball_loggermanager.h>

Initialize the logger manager singleton.

static
LoggerManager&
initSingleton(bslma::Allocator* globalAllocator = 0);
» more...

Same as the preceding overload, using the specified configuration.

static
LoggerManager&
initSingleton(
    LoggerManagerConfiguration const& configuration,
    bslma::Allocator* globalAllocator = 0);
» more...

Initialize the logger manager singleton from an existing instance.

static
int
initSingleton(
    LoggerManager* singleton,
    bool adoptSingleton = false);
» more...

Initialize the logger manager singleton with the given observer.

static
LoggerManager&
initSingleton(
    Observer* observer,
    bslma::Allocator* globalAllocator = 0);
» more...

Same as the preceding overload, using the specified configuration.

static
LoggerManager&
initSingleton(
    Observer* observer,
    LoggerManagerConfiguration const& configuration,
    bslma::Allocator* globalAllocator = 0);
» more...

Return Value

  • non-const reference to the logger manager singleton
  • 0 if the singleton was successfully initialized, and a non-zero value otherwise

Parameters

NameDescription
globalAllocatormemory allocator; null uses the global
configurationhow the singleton should be configured
singletonlogger manager instance to install as the singleton
adoptSingletonwhether this method takes ownership of singleton
observerobserver that receives published log records