initSingleton overloads

Synopses

Declared in <ball_loggermanager.h>

Initialize the logger manager singleton.

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

Same as the preceding overload, using the specified configuration.

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

Initialize the logger manager singleton from an existing instance.

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

Initialize the logger manager singleton with the given observer.

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

Same as the preceding overload, using the specified configuration.

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

Return Value

  • non‐`const` reference to the logger manager singleton

  • 0 if the singleton was successfully initialized, and a non‐zero value otherwise

Parameters

Name

Description

globalAllocator

memory allocator; null uses the global

configuration

how the singleton should be configured

singleton

logger manager instance to install as the singleton

adoptSingleton

whether this method takes ownership of singleton

observer

observer that receives published log records

Created with MrDocs