Initialize the logger manager singleton with the given observer.
Synopsis
Declared in <ball_loggermanager.h>
static
LoggerManager&
initSingleton(
Observer* observer,
bslma::Allocator* globalAllocator = 0);
Description
Initialize the logger manager singleton having the specified observer that receives published log records. Optionally specify a configuration describing how the singleton should be configured. If configuration is not specified, a default constructed LoggerManagerConfiguration object is used. Optionally specify a globalAllocator used to supply memory. If globalAllocator is 0, the currently installed global allocator is used. Return a non‐`const` reference to the logger manager singleton. This method has no effect (aside from logging a warning) if the logger manager singleton already exists. The behavior is undefined if observer is 0, goes out of scope, or is otherwise destroyed.
DEPRECATED: Use the initSingleton 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.
Return Value
non‐`const` reference to the logger manager singleton
Parameters
Name |
Description |
observer |
observer that receives published log records |
globalAllocator |
memory allocator; null uses the global |
Created with MrDocs