Logger Configuration
Examples of Logger configuration can be found here.
The Logger should be completely configured, including receivers, replay sources,
and metadata, BEFORE the Logger is started automatically at the beginning of runLoggedOpMode()
Log Receivers
A log receiver is something that accepts the current cycle's logged data, and puts it somewhere
like a log file or stream. Receivers currently included in Chrono are RLOGServer and
RLOGWriter.p
- Kotlin
- Java
In Kotlin, receivers can be added using the += operator, or a method:
init {
// Adding an RLOG stream using the += operator:
Logger.receivers += RLOGServer()
// Adding an RLOG file writer using the method:
Logger.addReceiver(RLOGWriter())
}
In Java, receivers can be added like this in your constructor:
public YourOpMode() {
Logger.addReceiver(new RLOGServer());
}
Metadata
Metadata is data about your log, and can be viewed in AdvantageScope.
Some examples of metadata include:
- Git versions and dates
- Runtime environments
- Your robot's name
It is entirely up to you what metadata you do and don't include in your logs.
More information on setting up version metadata, such as branches and git hashes, can be found here
- Kotlin
- Java
init {
// Adding metadata with the += operator:
Logger.metadata += "ProjectName" to "2025RobotCode"
// Adding metadata with the method:
Logger.addMetadata("GitHash", GVersion.GIT_HASH)
}
public YourOpMode() {
Logger.addMetadata("FTCYear", "2025");
}