[#BloombergLP-ball-LoggerCategoryUtil-setThresholdLevels]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/LoggerCategoryUtil.adoc[LoggerCategoryUtil]::setThresholdLevels
:relfileprefix: ../../../
:mrdocs:

Set threshold levels for categories matching a pattern with optional `&ast;`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
setThresholdLevels(
    xref:BloombergLP/ball/LoggerManager.adoc[LoggerManager]* loggerManager,
    char const* pattern,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);
----

== Description

Same as `setThresholdLevelsHierarchically` except that a `&ast;` located at the end of `pattern` is recognized as a special character and removed before performing the operation&period; Thus, this function sets, in the specified `loggerManager`, the threshold levels of every existing and future category whose name has, as a prefix, the substring of `pattern` excluding an optional trailing `&ast;`, to the specified threshold values, `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel`&period; In case `pattern` is `&ast;` or empty, set the threshold level of every existing category, and remove all preliminary settings (for categories that do not exist yet)&period; Return the number of categories whose threshold levels were set, and a negative value, with no effect, if any of the specified threshold values is outside the range `&lsqb;0 &period;&period; 255&rsqb;`&period; The behavior is undefined unless `loggerManager` is not in the process of being destroyed&period; See also `setThresholdLevelsHierarchically` and `ball&colon;&colon;CategoryManager&colon;&colon;setThresholdLevelsHierarchically`&period;

DEPRECATED&colon; Use `setThresholdLevelsHierarchically` instead&period;

== Return Value

number of categories updated, or a negative value on error

== Parameters

[cols="1,4"]
|===
| Name| Description
| *loggerManager*
| logger manager whose categories are updated
| *pattern*
| category&hyphen;name pattern, optionally ending in `&ast;`
| *recordLevel*
| record threshold level to set
| *passLevel*
| pass threshold level to set
| *triggerLevel*
| trigger threshold level to set
| *triggerAllLevel*
| trigger&hyphen;all threshold level to set
|===


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