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

Load the threshold levels that would apply to a new category&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
thresholdLevelsForNewCategory(
    xref:BloombergLP/ball/ThresholdAggregate.adoc[ThresholdAggregate]* levels,
    char const* categoryName) const;
----

== Description

Load into the specified `&ast;levels` the threshold levels that would be set for a newly created category, irrespective of whether a category with the specified `categoryName` is already in the registry&period; Return 0 on success and a non&hyphen;zero value otherwise&period; If the client has configured a default threshold levels callback (see `ball&colon;&colon;LoggerManager&colon;&colon;DefaultThresholdLevelsCallback` in the component doc), the `categoryName` will be supplied to that callback which will set `&ast;levels`&period; Otherwise, if no default threshold levels callback has been provided, the default threshold levels are used&period; Note that this function will report an error if the callback returns invalid levels&period; Also note that if a category named `categoryName` is already in the registry, the levels returned by this method may differ from the levels of that category&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *levels*
| destination for the threshold levels that would apply
| *categoryName*
| category name used to determine the thresholds
|===


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