BDE 4.14.0 Production release
Loading...
Searching...
No Matches
ball::LoggerManagerScopedGuard Class Reference

#include <ball_loggermanager.h>

Public Member Functions

 LoggerManagerScopedGuard (Observer *observer, const LoggerManagerConfiguration &configuration, bslma::Allocator *globalAllocator=0)
 
 LoggerManagerScopedGuard (const LoggerManagerConfiguration &configuration, bslma::Allocator *globalAllocator=0)
 
 ~LoggerManagerScopedGuard ()
 

Detailed Description

This class implements a scoped guard that, on construction, creates the logger manager singleton, and, on destruction, destroys the singleton.

See ball_loggermanager

Constructor & Destructor Documentation

◆ LoggerManagerScopedGuard() [1/2]

ball::LoggerManagerScopedGuard::LoggerManagerScopedGuard ( Observer observer,
const LoggerManagerConfiguration configuration,
bslma::Allocator globalAllocator = 0 
)
inline

Create a scoped guard that will create the logger manager singleton having the specified observer that receives published log records and the specified configuration of defaults and attributes. Optionally specify a globalAllocator used to supply memory. If globalAllocator is 0, the currently installed global allocator is used. 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. Note that on destruction, this scoped guard will destroy the logger manager singleton, if the singleton exists at that time.

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

◆ LoggerManagerScopedGuard() [2/2]

ball::LoggerManagerScopedGuard::LoggerManagerScopedGuard ( const LoggerManagerConfiguration configuration,
bslma::Allocator globalAllocator = 0 
)
inlineexplicit

Create a scoped guard that will create the logger manager singleton having the specified configuration of defaults and attributes. Optionally specify a globalAllocator used to supply memory. If globalAllocator is 0, the currently installed global allocator is used. This method has no effect (aside from logging a warning) if the logger manager singleton already exists. Note that on destruction, this scoped guard will destroy the logger manager singleton, if the singleton exists at that time.

◆ ~LoggerManagerScopedGuard()

ball::LoggerManagerScopedGuard::~LoggerManagerScopedGuard ( )
inline

Destroy the logger manager singleton, if the singleton exists, and destroy this scoped guard.


The documentation for this class was generated from the following file: