LogManagerKtx

class LogManagerKtx(val manager: LogManager)

A manager of the Logs group of Mcu Manager, with suspending methods. It wraps LogManager.

Every method suspends until the response is received, and throws a McuMgrException if the request fails, or a McuMgrErrorException if the device responds with an error, that is with a non-zero return code. Cancelling the calling coroutine stops waiting for the response, but does not cancel the request, which has already been sent.

Use the manager to set a logger, the upload MTU, etc.

Constructors

Link copied to clipboard
constructor(manager: LogManager)
constructor(transport: McuMgrTransport)

Creates the manager using the given transport.

Properties

Link copied to clipboard

The manager of the Mcu Manager library, which sends the requests.

Functions

Link copied to clipboard
suspend fun clear(): McuMgrResponse

Clears the logs on the device.

Link copied to clipboard

Lists the log levels.

Link copied to clipboard

Lists the logs.

Link copied to clipboard

Lists the log modules.

Link copied to clipboard
suspend fun show(logName: String? = null, minIndex: Long? = null, minTimestamp: Date? = null): McuMgrLogResponse

Reads the log entries.