Gray Matter LogoGray Matter Workshop

Logging Options

KEY CONCEPT

Data Logging - Understanding What Happened

Data logging captures robot telemetry, sensor values, and system state during operation. This data is essential for debugging issues, analyzing performance, tuning mechanisms, and understanding what happened during a match.

โ†ณ TAKEAWAY

Logging turns debugging from guesswork into data-driven problem solving.

Why Logging Matters in FRC

๐ŸŽฏ The Logging Challenge

During a match, your robot operates for only 2-3 minutes. When something goes wrong, you need to quickly understand what happened and fix it before the next match. Without logging, you're debugging blind.

โŒ Without Logging

  • Guess what went wrong based on driver observation
  • Attempt to reproduce issues in the pits
  • Waste time debugging problems that already occurred
  • Miss subtle performance issues and edge cases
  • Struggle to tune PID and feedforward values

โœ… With Logging

  • Review exact robot state from any match
  • Analyze sensor data, motor outputs, and commands
  • Identify root causes of failures quickly
  • Optimize performance with data-driven decisions
  • Tune PID values using real match data

Debug Faster

See exactly what your robot was doing when something went wrong. No more guessing or trying to reproduce issues.

Tune Better

Analyze PID response curves, feedforward effectiveness, and mechanism performance with real match data.

Improve Continuously

Track performance metrics across matches to identify trends and opportunities for improvement.

Logging is a Competitive Advantage

Top FRC teams invest heavily in logging because diagnosing and fixing an issue between matches can decide an elimination round.

What Should You Log?

Effective logging captures all relevant robot state while managing data volume and performance impact:

๐ŸŽฎ Inputs

  • Joystick values and button presses
  • Sensor readings (encoders, gyros, limit switches)
  • Vision detection results
  • NetworkTables values
  • Game-specific data (alliance, match number)

๐Ÿค– Robot State

  • Motor outputs (voltage, current, duty cycle)
  • Mechanism positions and velocities
  • Robot pose (X, Y, heading)
  • Subsystem states and modes
  • Active commands

โš™๏ธ Control Signals

  • Target setpoints and actual values
  • PID error and output
  • Feedforward calculations
  • Path following targets
  • Control loop timing

Balance Detail with Performance

Logging has costs, and too much of it starts to hurt the robot:

  • Network bandwidth:Don't spam NetworkTables with high-frequency data
  • CPU overhead:Logging shouldn't slow down control loops
  • Storage space: Log files can grow large with high-frequency data
  • Best practice: Use efficient binary logging formats and appropriate sample rates

FRC Logging Framework Options

Several logging frameworks are available for FRC teams. Each has different features, complexity, and use cases:

1

DataLogManager (WPILib Built-in)

Official WPILib data logging system that captures all NetworkTables data to binary .wpilog files.

โœ… Advantages

  • Built into WPILib - no additional dependencies
  • Automatically logs all NetworkTables data
  • Efficient binary format (.wpilog) for compact storage
  • Integrated with AdvantageScope for visualization
  • Simple setup with one line of code
  • Low performance overhead

โš ๏ธ Limitations

  • Only logs data published to NetworkTables
  • No built-in replay/simulation capabilities
  • Requires manual data publication from code
  • Less structured than framework-based approaches

๐ŸŽฏ Best For

Teams who want simple, effective logging without additional framework complexity. Ideal for most FRC teams.

2

AdvantageKit

Logging, telemetry, and replay framework developed by Team 6328 (Mechanical Advantage). The Logger can be used on its own as a drop-in telemetry sink, or with the optional IO layer to unlock deterministic replay.

โœ… Advantages

  • One API, two outputs: Logger.recordOutput(...) writes to both NetworkTables and a .wpilog file
  • Free built-in capture: DriverStation, joysticks, alerts, console, PDP/PDH, CAN, battery, and loop timing โ€” no code required
  • Rich type support: Pose2d/3d, ChassisVelocities, SwerveModuleState, units, custom record structs
  • @AutoLogOutput annotation for zero-boilerplate logging of fields and getters
  • Optional replay path: add the IO layer later to unlock deterministic match replay in simulation
  • First-class integration with AdvantageScope

โš ๏ธ Considerations

  • Requires extending LoggedRobot instead of TimedRobot
  • Vendordep + one annotation processor entry in build.gradle
  • USB logging on a real robot needs a FAT32-formatted USB stick plugged into the roboRIO
  • Full deterministic replay does require restructuring subsystems around the IO layer โ€” that piece is optional and not covered in this workshop

๐ŸŽฏ Best For

Teams who want the cleanest logging API in FRC today, strong type-aware output recording, and the option to grow into deterministic replay later without rewriting their telemetry.

3

Hoot Logging

Lightweight logging framework specifically designed for CTRE Phoenix 6 and modern FRC hardware.

โœ… Advantages

  • Optimized for Phoenix 6 signals and CTRE hardware
  • Automatic capture of motor controller telemetry
  • Low overhead with efficient signal logging
  • Simple API for custom logging
  • Outputs to .wpilog format
  • Works well with CANivore high-frequency data

โš ๏ธ Limitations

  • Focused primarily on CTRE ecosystem
  • Less comprehensive than AdvantageKit
  • Smaller community and documentation

๐ŸŽฏ Best For

Teams using CTRE Phoenix 6 hardware who want optimized logging for motor controllers and CANivore devices.

4

WPILib Epilogue (Java Only)

Annotation-based logging framework built into WPILib 2025+. Automatically generates logging code at compile time using the @Logged annotation.

โœ… Advantages

  • Zero boilerplate: Add @Logged annotation, get automatic logging
  • Built into WPILib - no additional dependencies
  • Generates efficient logging code at compile time (no runtime overhead)
  • Logs to NetworkTables and DataLog automatically
  • Works with AdvantageScope out of the box
  • Configurable timing (defaults to 50Hz offset from robot loop)
  • Performance metrics logged to NetworkTables

โš ๏ธ Limitations

  • Java only (not available for C++ or Python)
  • Requires WPILib 2025 or later
  • Only available for teams using annotation processing (Gradle default)
  • Less control than manual logging approaches
  • New in 2025 - still maturing

๐ŸŽฏ Best For

Java teams on WPILib 2025+ who want the simplicity of DataLogManager with better structure and less manual code.

Logging Framework Comparison

FeatureDataLogManagerEpilogueAdvantageKitHoot Logging
Setup ComplexityVery Easy - One lineVery Easy - AnnotationsEasy (logging-only) / Complex (with replay)Easy - Simple integration
Learning CurveMinimalMinimalLow (logging-only) / Steep (with replay)Moderate
Performance ImpactVery LowVery Low (compile-time)Low (when properly configured)Very Low
Data CaptureNetworkTables onlyAnnotated classesComprehensive (all I/O)Focused on CTRE devices
Replay CapabilityNo (visualization only)No (visualization only)Yes (deterministic)Yes (limited)
VisualizationAdvantageScopeAdvantageScopeAdvantageScopeAdvantageScope or Tuner X
Community SupportWPILib officialWPILib officialStrong (Team 6328)Growing
Best Use CaseWorkshop choice โ€” simple, captures all NTJava teams, minimal boilerplateRich types, optional deterministic replayCTRE-focused teams

Recommended Approach for This Workshop

๐Ÿ“Š Using WPILib DataLogManager

For this workshop we mirror the 2027 template and use WPILib's built-in DataLogManager. It records every NetworkTables value change โ€” including everything the drivetrain's telemetry publishes โ€” to a binary .wpilog file, plus console output and (via DriverStation.startDataLog) the Driver-Station and joystick data. There's no extra vendordep, no LoggedRobot, and no replay layer to learn.

Why DataLogManager?

  • Built into WPILib: no vendordep, and two lines in Robot's constructor turn it on
  • Captures all NetworkTables data automatically (your telemetry plus DS/joystick state) to an efficient .wpilog
  • Opens directly in AdvantageScope for graphing and review
  • Phoenix 6 devices also log to a .hoot file readable in Tuner X or AdvantageScope, so you get extra signal data for free
  • Fewest moving parts, which suits a teaching codebase

What we're NOT using (and why)

  • AdvantageKit โ€” its IO-layer / replay model is more than this workshop needs; DataLogManager covers record-and-review
  • Epilogue (@Logged) โ€” a fine alternative, but DataLogManager + plain NetworkTables publishing keeps the mental model smallest
  • Deterministic log replayโ€” out of scope; we record and review logs, we don't re-run them through the code

How it looks

Two lines in Robot's constructor start it (DataLogManager.start() + DriverStation.startDataLog(DataLogManager.getLog())); after that you just publish the values you care about to NetworkTables โ€” the swerve telemetry helper already does this for the drivetrain. The next lesson wires it all up.

ON THE HORIZON

A new WPILib Telemetry API is in development

WPILib is working on a first-class telemetry framework โ€” a static Telemetry.log("name", value) API with pluggable backends for NetworkTables and log files (allwpilib PR #7773). As of mid-2026 it is still an open draft: not merged, not in any 2027 alpha. If it ships, this workshop will likely adopt it in place of hand-rolled NetworkTables publishing. Until then, DataLogManager is the shipped, supported path.

Additional Resources

CHECKPOINT ยท 5 ITEMS

What's Next?

Up Next: Implementing Logging

Next you'll start DataLogManager in Robot's constructor, publish your robot state to NetworkTables so it lands in the .wpilog, and open the result in AdvantageScope.