By default, DogLog uses a settings configuration that will be safe for a competition environment, but most teams will want to tweak the settings to suit their needs.
Logger options
Section titled “Logger options”Capture driver station
Section titled “Capture driver station”The captureDs option controls whether joystick data and driver station values (ex. "enabled" or "autonomous") should be included in logs.
Due to a a limitation in WPILib's DataLogManager, these values can't be published over NetworkTables. Also, once enabled, this option can't be disabled.
By default driver station capture is disabled.
DogLog.setOptions(new DogLogOptions().withCaptureDs(true));Log extras
Section titled “Log extras”The logExtras option controls whether "extra" data like PDH currents, CAN bus usage, battery voltage, radio connection status, and other system stats should be included in logs.
By default extras logging is enabled.
DogLog.setOptions(new DogLogOptions().withLogExtras(false));Capturing console output
Section titled “Capturing console output”The captureConsole option controls whether console output (from /home/lvuser/FRC_UserProgram.log) should be included in logs.
Due to a a limitation in WPILib's DataLogManager, these values can't be published over NetworkTables.
By default console capture is enabled.
DogLog.setOptions(new DogLogOptions().withCaptureConsole(false));NetworkTables tunable values
Section titled “NetworkTables tunable values”The ntTunables option controls whether NetworkTables will be used for tunable values.
Using tunable values over NetworkTables at competitions is risky, most likely you are better off using hardcoded values in your code.
By default, DogLog will ignore tunable values published on NetworkTables if the robot is connected to the FMS on a competition field.
DogLog.setOptions(new DogLogOptions().withNtTunables(true));DogLog.setOptions(new DogLogOptions().withNtTunables(() -> true));Logging PDH/PDP data
Section titled “Logging PDH/PDP data”When logExtras is enabled, DogLog can automatically log data from the PDP/PDH like battery voltage, device currents, etc.
To enable this, somewhere in your robot code provide a PowerDistribution instance to DogLog.setPdh():
DogLog.setPdh(new PowerDistribution());Calling DogLog.setPdh(null) will disable PDH logging. By default, no PDH logging is performed.
Disabling the logger
Section titled “Disabling the logger”By default, the logger is enabled. When disabled, all log calls will be ignored and nothing will be logged, which can be useful when debugging things like performance issues.
If you want to disable it, you can do so with DogLog.setEnabled():
DogLog.setEnabled(false);And you can re-enable it with:
DogLog.setEnabled(true);