Skip to content

Message Filter

Logs are a treasure trove of information. But, with logs coming in thick and fast, how do you focus on the ones that matter? What if you could filter logs based on specific phrases or keywords? Cobra Logging's MessageFilter is designed for this exact purpose.

How Does It Work?

Upon invoking the Validate method: - If Messages property is devoid of any content, every log proceeds unhindered. - With UseContainsCheck set to true, the filter scans if the log's message holds any string from the Messages set. - Conversely, if UseContainsCheck is false, an exact match between the log's message and the Messages set is pursued.