Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Declaration
@class SPXFileLogger : NSObject;
Description
Class with static methods to control file-based SDK logging. Turning on logging while running your Speech SDK scenario provides detailed information from the SDK's core native components. If you report an issue to Microsoft, you may be asked to provide logs to help Microsoft diagnose the issue. Your application should not take dependency on particular log strings, as they may change from one SDK release to another without notice. SPXFileLogger is the simplest logging solution and suitable for diagnosing most on-device issues when running Speech SDK. Added in version 1.43.0
File logging is a process wide construct. That means that if (for example) you have multiple speech recognizer objects running in parallel, there will be one log file containing interleaved logs lines from all recognizers. You cannot get a separate log file for each recognizer.
Class Methods
start:append:error:
Starts logging to a file.
+ (void)start:(NSString * _Nonnull)path append:(BOOL)append
error:(NSError * _Nullable * _Nullable)outError
Parameters
path
- Path to a log file on local disk.append
- If true, appends to existing log file. If false, creates a new log file.outError
- The error information.
start:append:
Starts logging to a file.
+ (void)start:(NSString * _Nonnull)path append:(BOOL)append
Parameters
path
- Path to a log file on local disk.append
- If true, appends to existing log file. If false, creates a new log file.
start:error:
Starts logging to a file.
+ (void)start:(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)outError
Parameters
path
- Path to a log file on local disk.outError
- The error information.
start:
Starts logging to a file.
+ (void)start:(NSString * _Nonnull)path
Parameters
path
- Path to a log file on local disk.
stop:
Stops logging to a file.
+ (void)stop:(NSError * _Nullable * _Nullable)outError
Parameters
outError
- The error information.
stop
Stops logging to a file.
+ (void)stop
setFilters:error:
Sets or clears the filters that apply to file logging.
+ (void)setFilters:(NSArray<NSString *> * _Nullable)filters
error:(NSError * _Nullable * _Nullable)outError
Parameters
filters
- Filters to use, or nil or an empty list to remove previously set filters.outError
- The error information.
setFilters:
Sets or clears the filters that apply to file logging.
+ (void)setFilters:(NSArray<NSString *> * _Nullable)filters
Parameters
filters
- Filters to use, or nil or an empty list to remove previously set filters.
setLevel:
Sets the level of the messages to be captured by the logger.
+ (void)setLevel:(SPXLogLevel)level
Parameters
level
- Maximum level of detail to be captured by the logger.