log

inline fun <T : Any> Fate.log(name: String, value: T)

Logs value at name under the root table, inferring its schema from T's static type, type arguments included.

See also


inline fun <T : Any> FateTable.log(name: String, value: T)

Logs value at name, inferring its schema from T's static type, type arguments included.

This is the Kotlin form of FateTable.logErased. It can log a parameterized value:

table.log("powers", mapOf("fl" to 0.5))    // Map<String, Double>
table.log("path", listOf(a, b, c)) // List<Pose>
table.log("voltage", battery.voltage) // Double

It is an extension because a member would have the same JVM signature as FateTable.logErased. See FateTable for how a path's type is fixed.