Usage
Auto Logging
How to use @AutoLog and periodic logging.
FTC Auto Logger – How To Use
📦 Prerequisites
Before logging can begin, you need to make a few changes to your OpMode:
- Initialize the Logger
Add the following line inside your OpMode'sinit()method:KoalaLog.setup(hardwareMap); - Enable Periodic Logging
Add this line inside yourloop()orrun()method:AutoLogManager.periodic();This call logs all data from classes marked with
@AutoLog.
📝 Auto Logging with @AutoLog
The @AutoLog annotation allows you to automatically log and publish supported data types from any public fields or methods.
✅ Supported Features
- Automatically logs public fields of supported types.
- Logs methods or suppliers returning supported types when they are called.
- Publishes data to both
.wpilogand the FTC Dashboard.
🧪 Example Usage
Annotate your class with @AutoLog:
@AutoLog
public class ExampleSubsystem {
public double encoderPosition;
public boolean isBusy() {
return someCondition;
}
}🏷️ Accessing the Logged Version
When using an auto-logged class, use the generated <ClassName>AutoLogged instead of your original class:
// Instead of this:
ExampleSubsystem example = new ExampleSubsystem();
// Use this:
ExampleSubsystemAutoLogged example = new ExampleSubsystemAutoLogged();@DoNotLog
Adding @DoNotLog above a field or method will make sure it is not logged.
Last updated on