logs

fun logs(block: Runnable)

Logs multiple values within the provided block context.

This function captures logs generated within the block and logs them all at once after the block has been executed. It uses a custom LogContext to temporarily override the log method to capture logs instead of immediately logging them.

Parameters

block

The block of code within which logs will be captured.


fun logs(vararg logs: Log)

Logs multiple values with their respective keys based on the type of each value.

Parameters

logs

Vararg parameter of pairs where the first element is the key and the second element is the value to log.


fun logs(key: String?, value: Double)

Logs a double value with a specified key if the system is in test mode.

Parameters

key

The key associated with the value to log.

value

The double value to log.


fun logs(key: String?, value: Int)

Logs an integer value with a specified key if the system is in test mode.

Parameters

key

The key associated with the value to log.

value

The integer value to log.


fun logs(key: String?, value: Boolean)

Logs a boolean value with a specified key if the system is in test mode.

Parameters

key

The key associated with the value to log.

value

The boolean value to log.


fun logs(key: String?, value: String?)

Logs a String value with a specified key if the system is in test mode.

Parameters

key

The key associated with the value to log.

value

The String value to log.


fun <T : WPISerializable?> logs(key: String?, value: T)

Logs a WPISerializable value with a specified key if the system is in test mode.

Parameters

key

The key associated with the value to log.

value

The WPISerializable value to log.


fun <T : StructSerializable?> logs(key: String?, vararg value: T)

Logs a StructSerializable value with a specified key if the system is in test mode.

Parameters

key

The key associated with the value to log.

value

The SwerveModuleState value to log.