import { ILogEntry, ILogFilterOptions, LogFilter } from "@spinajs/log-common"; /** * Options for {@link MatchFilter}. */ export interface IMatchFilterOptions extends ILogFilterOptions { /** Regex source tested against the chosen field. Required. */ pattern: string; /** Variable field to test. Default "message". */ field?: string; /** "keep" ( default ) keeps on match, drops otherwise; "drop" drops on match. */ mode?: "keep" | "drop"; /** RegExp flags ( eg. "i" ). */ flags?: string; } /** * Regex keep/drop filter. Builds a RegExp from `pattern`/`flags` and tests it * against `String(entry.Variables[field])` ( field defaults to "message" ). * In "keep" mode the entry is kept only on a match; in "drop" mode it is * dropped on a match. An invalid pattern degrades to a no-op ( pass-through ) * and warns ONCE so a bad config never silently swallows or drops everything. */ export declare class MatchFilter extends LogFilter { protected regex: RegExp | null; protected field: string; protected mode: "keep" | "drop"; protected warned: boolean; constructor(options?: IMatchFilterOptions); apply(entry: ILogEntry): ILogEntry | null; } //# sourceMappingURL=MatchFilter.d.ts.map