LogPingu

object LogPingu

Singleton object for logging key-value pairs and metadata within the project.

Provides utility functions to log various data types, manage ignored files, and batch log entries. Integrates with WPILib and AdvantageKit for output and metadata recording, primarily for test mode operations.

Properties

Link copied to clipboard

Represents files to ignore during logging. Can also include directories. Files and folders are not required to have a file path, will ignore all files and folders with the same name. Ignored files will use project root as base path Case-sensitive

Link copied to clipboard

Indicates whether the system is in test mode. When true, logging functions will record outputs.

Functions

Link copied to clipboard

Adds a file or directory name to the set of ignored files for logging.

Link copied to clipboard
fun log(string: String, value: Any)

Logs a key-value pair.

Link copied to clipboard
fun logs(block: Runnable)

Executes a block of code, capturing all logs generated within the block.

fun logs(vararg logs: Log)

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

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

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

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

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

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

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

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

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

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

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

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

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

inline fun <A, B> A.logs(key: String?, value: B)

Logs a value of generic type B with a specified key if the system is in test mode, unless the class name of A matches any entry in IGNORED_FILES.

Link copied to clipboard
fun metaLogs(key: String?, value: String?)

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

Link copied to clipboard
operator fun String.plus(value: Any)

Logs a key-value pair.

Link copied to clipboard
infix fun String.to(value: Any)

Logs a key-value pair.