Skip to content

FAQ

What’s the difference between DogLog and other logging libraries?

Section titled “What’s the difference between DogLog and other logging libraries?”

Within the FRC software ecosystem, there are three main solutions for logging: DogLog, AdvantageKit, and Epilogue.

Here’s a quick breakdown of the differences between each library:

DogLogAdvantageKitEpilogue
CreatorTeam 581Team 6328WPILib
Logging patternDogLog.log()IO interfaces and annotationsAnnotations
Use caseSimplest logging possibleReplaying logs in simulationLog every public or private field in a class
Customizable log destinationsYes (NT and datalog)Yes (NT and datalog)No (NT always on, datalog can be toggled)
MultithreadingFully configurable (can use main thread or a separate thread)Required (always uses log processing thread)No
Tunable valuesYesYesNo
Unit metadataYesYesNo
Supported languageJavaJavaJava

While it may technically be possible to use DogLog in combination with other logging libraries, this is definitely not recommended. You will almost certainly encounter bugs or other compatibility issues as a result.

DogLog is used by teams across the FRC community for a variety of purposes. Here’s a selection of DogLog users with open-source robot code you can review for inspiration:

And of course,

It can be tempting to simply throw every possible piece of data at DogLog, but often times this causes more problems than it solves. While DogLog is highly optimized for performant logging, at a certain point the roboRIO simply can’t keep up with the volume of data being logged.

Take a look at all the fields you are logging, and think about whether or not they’re actually useful for your team. Here’s a few examples:

  • Several debug logs added when first doing robot bring-up, which aren’t relevant anymore
  • Logging more values than necessary for every motor (ex. temperature, stator current, supply current, applied voltage, velocity, etc.)
  • Capturing all NetworkTables values, instead of just manually logging the handful of relevant fields

Feel free to open a GitHub issue if you’ve found a bug or there’s a feature request you’d like to see.

If you have questions about DogLog, how to use it, or anything else, you can start a GitHub discussion or create a reply on the DogLog Chief Delphi thread.

Imperative logging describes the pattern of calling a function to log a value. Compared to alternative methods like IO layers or annotations, imperative logging is the simplest approach.

You have full explicit control over what is logged and when, compared to annotation based logging. Annotation based logging typically involves using Java’s reflection to discover all the fields in a class, and then schedule logic that records all the fields to a log file.

Imperative logging avoids the complexity associated with reflection, you just call DogLog.log() and the value gets logged. Rather than the sort of “magic” that reflection uses, DogLog prioritizes clarity and simplicity.

DogLog itself is a fairly minimal library, all the actual logging is handled by WPILib using DataLogManager and NetworkTables 4. This ensures that DogLog takes advantage of the stability and performance of WPILib’s logging system.

Rather than trying to reinvent core logging primitives, DogLog focuses on providing a clean, powerful API on top of the WPILib logging featureset, without introducing extra complexity.