Usage
Once installed, getting started with DogLog is easy. This page will walk you through the first steps to integrating DogLog with your robot project.
Logging
First, import the library from the dev.doglog
namespace:
And then you can use Doglog.log()
to log values like so:
You can include these log statements in your periodic methods, or anywhere else you want to log data.
Configuring
DogLog comes with a safe, reasonable default configuration out of the box, but most users will want to customize it to their needs.
Here’s an example of how to set DogLog to use custom options:
-
Import the library at the top of
Robot.java
/RobotContainer.java
: -
In your
Robot
/RobotContainer
constructor, add the following lines:This configures DogLog to use the default options as a base, and extends them to capture driver station data to the logs.
Logging PDH/PDP data
If you have logging extras 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()
:
Calling DogLog.setPdh(null)
will disable PDH logging.