[#BloombergLP-ball-LoggerManager-initSingleton-0b1] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]::initSingleton :relfileprefix: ../../../ :mrdocs: Initialize the logger manager singleton from an existing instance. == Synopsis Declared in `<ball_loggermanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int initSingleton( xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]* singleton, bool adoptSingleton = false); ---- == Description Initialize the logger manager singleton with the specified `singleton`. Optionally specify an `adoptSingleton` flag indicating whether this method takes ownership of `singleton`, in which case `shutDownSingleton` will destroy `singleton`. If `adoptSingleton` is not specified, this method does _not_ take ownership of `singleton` (and `shutDownSingleton` will not destroy it). Return 0 if the logger manager singleton was successfully initialized, and a non‐zero value otherwise. This method has no effect (aside from logging a warning) if the logger manager singleton already exists, in which case this method does _not_ take ownership of `singleton` regardless of the value of `adoptSingleton`. Note that this version of `initSingleton` is meant for use _only_ on Windows to initialize another dynamically loaded copy of the `LoggerManager` system. Also note that a suitable singleton may be obtained by calling `createLoggerManager`, or from the `singleton` class method of an already‐initialized `LoggerManager` system. == Return Value 0 if the singleton was successfully initialized, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *singleton* | logger manager instance to install as the singleton | *adoptSingleton* | whether this method takes ownership of `singleton` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#