LogSeverityFilter
public struct LogSeverityFilter: LogFilter
A LogFilter
implementation that filters out any LogEntry
with a
LogSeverity
less than a specified value.
-
The
LogSeverity
associated with the receiver.Declaration
Swift
public let severity: LogSeverity
-
Initializes a new
LogSeverityFilter
instance.Declaration
Swift
public init(severity: LogSeverity)
Parameters
severity
Specifies the
LogSeverity
that the filter will use to determine whether a givenLogEntry
should 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
LogEntry
should be recorded.Declaration
Swift
public func shouldRecord(entry: LogEntry) -> Bool
Parameters
entry
The
LogEntry
to be evaluated by the filter.Return Value
true
ifentry.severity
is as or more severe than the receiver’sseverity
property;false
otherwise.