BloombergLP::ball::LoggerManager::createLoggerManager

Create a non-singleton logger manager with the given observer.

Synopsis

Declared in <ball_loggermanager.h>

static
void
createLoggerManager(
    bslma::ManagedPtr<LoggerManager>* manager,
    Observer* observer,
    LoggerManagerConfiguration const& configuration,
    bslma::Allocator* basicAllocator = 0);

Description

Create a logger manager that is not the singleton logger manager having the specified observer that receives published log records and the specified configuration of defaults and attributes; load the newly-created logger manager into the specified manager managed pointer. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. The behavior is undefined if observer is 0, goes out of scope, or is otherwise destroyed. Note that this method does not create the singleton logger manager used by the macros of the BALL logging framework.

DEPRECATED: Use the createLoggerManager method that does not take a raw pointer to an observer, together with the registerObserver method (which takes a shared pointer to an observer), instead.

Parameters

NameDescription
managermanaged pointer that receives the new logger manager
observerobserver that receives published log records
configurationdefaults and attributes for the logger manager
basicAllocatormemory allocator; null uses the default