[#BloombergLP-ball-LoggerManagerScopedGuard-2constructor-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/LoggerManagerScopedGuard.adoc[LoggerManagerScopedGuard]::LoggerManagerScopedGuard
:relfileprefix: ../../../
:mrdocs:

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&period; Optionally specify a `globalAllocator` used to supply memory&period; If `globalAllocator` is 0, the currently installed global allocator is used&period; This method has no effect (aside from logging a warning) if the logger manager singleton already exists&period; The behavior is undefined if `observer` is 0, goes out of scope, or is otherwise destroyed&period; Note that on destruction, this scoped guard will destroy the logger manager singleton, if the singleton exists at that time&period;

== Synopsis

Declared in `&lt;ball&lowbar;loggermanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
LoggerManagerScopedGuard(
    xref:BloombergLP/ball/Observer.adoc[Observer]* observer,
    xref:BloombergLP/ball/LoggerManagerConfiguration.adoc[LoggerManagerConfiguration] const& configuration,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* globalAllocator = 0);
----

== Description

DEPRECATED&colon; Use the `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&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
