PolarLoggingApi
public protocol PolarLoggingApi
Polar logging API.
Provides access to diagnostic and trace log files stored on a Polar device, as well as the device sensor data log configuration.
Requires feature PolarBleSdkFeature.feature_polar_file_transfer.
-
exportDeviceLogs(_:Asynchronous) Export all available diagnostic and trace log files from the device.
The following files are attempted in order. Files that do not exist on the device are silently omitted from the result:
/ERRORLOG.BPB– Primary error log/ERRORLO2.BPB– Secondary error log/SYSLOG.TXT– System log/TRC1.BIN,/TRC2.BIN, … – Device telemetry data. Files are fetched sequentially starting from index 1 until a file is not found./DBGTRC1.BIN,/DBGTRC2.BIN, … – Device debug trace data. Files are fetched sequentially starting from index 1 until a file is not found.
Requires
Requires SDK feature(s):
PolarBleSdkFeature.feature_polar_file_transferThrows
See
PolarErrorsfor possible errors invoked.Declaration
Swift
func exportDeviceLogs(_ identifier: String) async throws -> [PolarDeviceLog]Parameters
identifierPolar device ID or BT address
Return Value
List of
PolarDeviceLogentries for all log files that exist on the device. -
getLogConfig(_:Asynchronous) Get log configuration from a device (SDLOGS.BPB)
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_device_controlThrows
SeePolarErrorsfor possible errors invoked.Declaration
Swift
func getLogConfig(_ identifier: String) async throws -> LogConfigParameters
identifierPolar device ID or BT address
Return Value
LogConfigdescribing the current SD log configuration on the device. -
setLogConfig(_:AsynchronouslogConfig: ) Set log configuration to a device (SDLOGS.BPB)
Requires
Requires SDK feature(s):PolarBleSdkFeature.feature_polar_device_controlThrows
SeePolarErrorsfor possible errors invoked.Declaration
Swift
func setLogConfig(_ identifier: String, logConfig: LogConfig) async throwsParameters
identifierPolar device ID or BT address
logConfiglog configuration to write to the device.