[#BloombergLP-ball-Rule-2constructor-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/Rule.adoc[Rule]::Rule :relfileprefix: ../../../ :mrdocs: Create a `Rule` with the specified pattern and threshold levels. == Synopsis Declared in `<ball_rule.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- Rule( std::string_view const& pattern, int recordLevel, int passLevel, int triggerLevel, int triggerAllLevel, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- == Description Create a `Rule` object whose pattern is the specified `pattern` and whose thresholds levels are the specified `recordLevel`, `passLevel`, `triggerLevel`, and `triggerAllLevel` respectively. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator will be used. The behavior is undefined unless each of the four threshold level values is not in the range [0 .. 255]. Note that a newly created `Rule` object does not have any attributes. == Parameters [cols="1,4"] |=== | Name| Description | *pattern* | category‐name pattern for this rule | *recordLevel* | record threshold level | *passLevel* | pass threshold level | *triggerLevel* | trigger threshold level | *triggerAllLevel* | trigger‐all threshold level | *basicAllocator* | memory allocator; null uses the default |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#