Pedro 3 has been released!
Pedro Pathing LogoPedro Pathing

Logging

How to log Pedro's states

Make sure you've read and understood Debugging Guide before reading this page.

Pedro Pathing has built-in integration with logging software. Here's how to use it:

Logging

You can add software to the Follower that automatically logs the FollowerLog during each follower.update().

A logger must be of the form Consumer<FollowerLog>, meaning that it must have a way to consume both a value.

You may add as many loggers as you like to the follower, as it stores them in a collection. Here is an example:

Follower follower = Constants.create(hardwareMap)
                        .withLogger(log -> telemetry.addData("Follower Logs", log.toString()))
                        .withLogger(value -> customLogger.log("I love Pedro", value));

Common Mistake

The Follower will NOT update your logger for you. For example, will still need to call telemetry.update() yourself each loop.

Last updated on

On this page