Annotation Logging with Epilogue

In a WPILib Java robot project, the HootEpilogueBackend (Java) can be used to integrate the Phoenix 6 Signal Logger with Epilogue. This makes it easy to register custom signals for logging using Java annotations.

@Logged
public class Robot extends TimedRobot {
   public Robot() {
      Epilogue.configure(config -> {
         // Log to both the Phoenix 6 SignalLogger
         // and NT4 backends
         config.backend = EpilogueBackend.multi(
            new HootEpilogueBackend(),
            new NTEpilogueBackend(NetworkTableInstance.getDefault())
         );

         if (Utils.isSimulation()) {
            // Re-throw any errors that occur in simulation
            config.errorHandler = ErrorHandler.crashOnError();
         }

         // ...
      });
      Epilogue.bind(this);
   }
}