LogSeverityFilter
public struct LogSeverityFilter: LogFilter
A LogFilter implementation that filters out any LogEntry with a
LogSeverity less than a specified value.
-
The
LogSeverityassociated with the receiver.Declaration
Swift
public let severity: LogSeverity -
Initializes a new
LogSeverityFilterinstance.Declaration
Swift
public init(severity: LogSeverity)Parameters
severitySpecifies the
LogSeveritythat the filter will use to determine whether a givenLogEntryshould be recorded. Only those log entries with a severity equal to or more severe than this value will pass through the filter. -
Called to determine whether the given
LogEntryshould be recorded.Declaration
Swift
public func shouldRecord(entry: LogEntry) -> BoolParameters
entryThe
LogEntryto be evaluated by the filter.Return Value
trueifentry.severityis as or more severe than the receiver’sseverityproperty;falseotherwise.
View on GitHub
LogSeverityFilter Struct Reference