WPILogBackend

Records logged values to a WPILogWriter, one entry per path.

The writer's output decides where the log goes. Closing this backend closes the writer.

Values are written with the timestamp the registry gave them, so the writer's own clock isn't involved. To keep a log lined up with a server or another backend, build the registry from the clock you want and give the writer the same source and origin.

After the backend is closed, its entries drop values quietly.

Constructors

Link copied to clipboard
constructor(writer: WPILogWriter)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Flushes pending records and closes the writer. Does nothing if already closed.

Link copied to clipboard
open override fun entry(path: String, type: TelemetryType, properties: Map<String, Any> = emptyMap()): TelemetryEntry

Returns the entry for path, creating it if this backend hasn't seen the path.

Link copied to clipboard
open override fun toString(): String