Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLLogFilter Class Reference

Section Contents

Overview

Undocumented

filter

Undocumented

Objective-C

@property (strong, nonatomic, readonly) SDLLogFilterBlock filter

Swift

var filter: SDLLogFilterBlock { get }

-init

Undocumented

Objective-C

- (instancetype)init NS_UNAVAILABLE;

-initWithCustomFilter:

Create a new filter with a custom filter block. The filter block will take a log model and return a BOOL of pass / fail.

Objective-C

- (nonnull instancetype)initWithCustomFilter:(nonnull SDLLogFilterBlock)filter;

Swift

init(customFilter filter: @escaping SDLLogFilterBlock)

Parameters

filter

The custom filter to be used

Return Value

An instance of SDLLogFilter

+filterByDisallowingString:caseSensitive:

Returns a filter that only allows logs not containing the passed string within their message.

Objective-C

+ (nonnull SDLLogFilter *)filterByDisallowingString:(nonnull NSString *)string
                                      caseSensitive:(BOOL)caseSensitive;

Swift

/*not inherited*/ init(byDisallowingString string: String, caseSensitive: Bool)

Parameters

string

The string, which, if present in the message of the log, will prevent the log from being logged.

caseSensitive

Whether or not string should be checked as case sensitive against the log’s message.

Return Value

A filter that may be passed into the logConfiguration.

+filterByAllowingString:caseSensitive:

Returns a filter that only allows logs containing the passed string within their message.

Objective-C

+ (nonnull SDLLogFilter *)filterByAllowingString:(nonnull NSString *)string
                                   caseSensitive:(BOOL)caseSensitive;

Swift

/*not inherited*/ init(byAllowing string: String, caseSensitive: Bool)

Parameters

string

The string, which, if present in the message of the log, will allow the log to be logged.

caseSensitive

Whether or not string should be checked as case sensitive against the log’s message.

Return Value

A filter that may be passed into the logConfiguration.

+filterByDisallowingRegex:

Returns a filter that only allows logs not passing the passed regex against their message.

Objective-C

+ (nonnull SDLLogFilter *)filterByDisallowingRegex:
    (nonnull NSRegularExpression *)regex;

Swift

/*not inherited*/ init(byDisallowingRegex regex: NSRegularExpression)

Parameters

regex

The regex, which, if it matches the message of the log, will prevent the log from being logged.

Return Value

A filter that may be passed into the logConfiguration.

+filterByAllowingRegex:

Returns a filter that only allows logs passing the passed regex against their message.

Objective-C

+ (nonnull SDLLogFilter *)filterByAllowingRegex:
    (nonnull NSRegularExpression *)regex;

Swift

/*not inherited*/ init(byAllowingRegex regex: NSRegularExpression)

Parameters

regex

The regex, which, if it matches the message of the log, will allow the log to be logged.

Return Value

A filter that may be passed into the logConfiguration.

+filterByDisallowingModules:

Returns a filter that only allows logs not within the specified file modules to be logged.

Objective-C

+ (nonnull SDLLogFilter *)filterByDisallowingModules:
    (nonnull NSSet<NSString *> *)modules;

Swift

/*not inherited*/ init(byDisallowingModules modules: Set<String>)

Parameters

modules

A set of module names. If any match, they will not be logged.

Return Value

A filter that may be passed into the logConfiguration.

+filterByAllowingModules:

Returns a filter that only allows logs of the specified file modules to be logged.

Objective-C

+ (nonnull SDLLogFilter *)filterByAllowingModules:
    (nonnull NSSet<NSString *> *)modules;

Swift

/*not inherited*/ init(byAllowingModules modules: Set<String>)

Parameters

modules

A set of module names. If any match, they will not be logged.

Return Value

A filter that may be passed into the logConfiguration.

+filterByDisallowingFileNames:

Returns a filter that only allows logs not within the specified files to be logged.

Objective-C

+ (nonnull SDLLogFilter *)filterByDisallowingFileNames:
    (nonnull NSSet<NSString *> *)fileNames;

Swift

/*not inherited*/ init(byDisallowingFileNames fileNames: Set<String>)

Parameters

fileNames

If a log matches any of the passed files, the log will not be logged.

Return Value

A filter that may be passed into the logConfiguration.

+filterByAllowingFileNames:

Returns a filter that only allows logs within the specified files to be logged.

Objective-C

+ (nonnull SDLLogFilter *)filterByAllowingFileNames:
    (nonnull NSSet<NSString *> *)fileNames;

Swift

/*not inherited*/ init(byAllowingFileNames fileNames: Set<String>)

Parameters

fileNames

If a log matches any of the passed files, the log will be logged.

Return Value

A filter that may be passed into the logConfiguration.

View on GitHub.com
Previous Section Next Section