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

Set threshold levels for categories matching a pattern&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
setThresholdLevels(
    char const* pattern,
    int recordLevel,
    int passLevel,
    int triggerLevel,
    int triggerAllLevel);
----

== Description

Set the threshold levels of each category currently in the registry of the logger manager singleton whose name matches the specified `pattern` to the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` values, respectively, if each of the threshold values is in the range `&lsqb;0 &period;&period; 255&rsqb;`&period; Return the number of categories whose threshold levels were set, and a negative value if any of the threshold values were invalid&period; `pattern` is assumed to be of the form &quot;X&quot; or &quot;X&ast;&quot; where X is a sequence of 0 or more characters and `&ast;` matches any string (including the empty string)&period; The behavior is undefined unless the logger manager singleton has been initialized and is not in the process of being shut down&period; Note that only a `&ast;` located at the end of `pattern` is recognized as a special character&period; Also note that this function has no effect on the threshold levels of categories added to the registry after it is called&period;

== Return Value

number of categories whose levels were set, or a negative value if any threshold was invalid

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pattern*
| category&hyphen;name pattern of the form &quot;X&quot; or &quot;X&ast;&quot;
| *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]#
