[#BloombergLP-ball-LoggerManager-initSingleton-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]::initSingleton
:relfileprefix: ../../../
:mrdocs:

`initSingleton` overloads

== Synopses

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

Initialize the logger manager singleton&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]&
xref:BloombergLP/ball/LoggerManager/initSingleton-06.adoc[initSingleton](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* globalAllocator = 0);
----

[.small]#xref:BloombergLP/ball/LoggerManager/initSingleton-06.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified `configuration`&period;


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

[.small]#xref:BloombergLP/ball/LoggerManager/initSingleton-05.adoc[_» more&period;&period;&period;_]#

Initialize the logger manager singleton from an existing instance&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/ball/LoggerManager/initSingleton-0b1.adoc[initSingleton](
    xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]* singleton,
    bool adoptSingleton = false);
----

[.small]#xref:BloombergLP/ball/LoggerManager/initSingleton-0b1.adoc[_» more&period;&period;&period;_]#

Initialize the logger manager singleton with the given observer&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]&
xref:BloombergLP/ball/LoggerManager/initSingleton-0bd.adoc[initSingleton](
    xref:BloombergLP/ball/Observer.adoc[Observer]* observer,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* globalAllocator = 0);
----

[.small]#xref:BloombergLP/ball/LoggerManager/initSingleton-0bd.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload, using the specified `configuration`&period;


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

[.small]#xref:BloombergLP/ball/LoggerManager/initSingleton-0f.adoc[_» more&period;&period;&period;_]#

== Return Value

* non&hyphen;`const` reference to the logger manager singleton
* 0 if the singleton was successfully initialized, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *globalAllocator*
| memory allocator&semi; 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
|===


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