# Status Logger

Introduced in 2026, Status Logger serves as the official solution to logging CAN status frames for REV devices. Previously, the third-party library, [Unofficial REV-Compatible Logger (URCL)](https://docs.advantagescope.org/more-features/urcl/), was the only solution for logging raw CAN data for REV devices, but Status Logger brings the core logging functionality natively to REVLib.

URCL still has its benefits over Status Logger, but the main benefit of Status Logger is that it is enabled by default and requires no setup. This is especially useful for a CSA diagnosing a problem with a team that may not have had the foresight to setup logging.

Status Logger supports the following devices:

* SPARK Flex
* SPARK MAX
* Servo Hub&#x20;
* MAXSpline Encoder

The code docs for Java and C++ are available below:

* [Java](https://codedocs.revrobotics.com/java/com/revrobotics/util/statuslogger)
* [C++](https://codedocs.revrobotics.com/cpp/class_status_logger.html)

## Robot setup

Status Logger will automatically log `.revlog` files to the roboRIO internal storage if no USB drive is attached. It is recommended to insert an external USB drive for storing `.revlog` files to reduce clutter on the roboRIO. Any inserted USB drive will be automatically logged to after it is initially plugged in and power cycled.

## Code setup

Status Logger is enabled by default on the first invocation of any REVLib device object, thus requiring no user setup for default behavior.

### Disabling Auto Logging

If desired, call the `disableAutoLogging()` static method to disable automatic logging. This method must be called before any other REVLib function is invoked. The recommended placement is as the first line in your `robotInit()` method. After calling this, logging will not occur until it is explicitly started with `start()`. This is useful for applications that require full manual control over the logging lifecycle.

{% tabs %}
{% tab title="Java" %}

```java
import com.revrobotics.util.StatusLogger;

@Override
public void robotInit() {
  StatusLogger.disableAutoLogging();
}
```

{% endtab %}

{% tab title="C++" %}

```cpp
#include "rev/util/StatusLogger.h"

Robot::Robot() {
  StatusLogger::DisableAutoLogging();
}
```

{% endtab %}
{% endtabs %}

### Manual Logging

With automatic logging disabled, the `start()` and `stop()` static methods can be called to start and stop writing data to the `.revlog` file when desired. An example use case could be calling `start()` at the beginning of `autonomousInit()` or `teleopInit()` and calling `stop()` at the beginning of `disabledInit()`. To avoid any expected behaviors, it is recommended to call `disableAutoLogging()` as described above before implementing manual logging.

{% tabs %}
{% tab title="Java" %}

```java
import com.revrobotics.util.StatusLogger;

@Override
public void robotInit() {
  StatusLogger.disableAutoLogging();
}

@Override
public void autonomousInit() {
  StatusLogger.start();
}

@Override void teleopInit() {
  StatusLogger.start();
}

@Override
public void disabledInit() {
  StatusLogger.stop();
}
```

{% endtab %}

{% tab title="C++" %}

```cpp
#include "rev/util/StatusLogger.h"

Robot::Robot() {
  StatusLogger::DisableAutoLogging();
}

void Robot::AutonomousInit() {
  StatusLogger::Start();

}

void Robot::TeleopInit() {
  StatusLogger::Start();
}

void Robot::DisabledInit() {
  StatusLogger::Stop();
}
```

{% endtab %}
{% endtabs %}

## Logging safeguards

To prevent overflowing the logging storage device, Status Logger has the following safeguards in place:

* When the log storage device has less than **100 MB** of free space remaining, `StatusLogger` sends a warning message to consider deleting old `.revlog` files off of the storage device.
* When the log storage device has less than **50 MB** of free space remaining, the oldest `.revlog` files in the log storage device are automatically deleted until the free space available is greater than **50 MB**.
* When the log storage device has less than **5 MB** of free space remaining, logging is stopped automatically. Deleting `.revlog` files can be done by accessing the file storage device through the methods described below and simply deleting the files to free up space.

### Retrieving `.revlog` files

Each `.revlog` file is named by start timestamp in the format: `REV_<Year><Month><Day>_<Hour><Minute><Second>.revlog` After logging, there are two ways of retrieving the `.revlog` file depending on your robot setup.

#### roboRIO Storage

If there is no USB drive plugged into the roboRIO, files can be retrieved via FTP. See [WPILib docs](https://docs.wpilib.org/en/stable/docs/software/roborio-info/roborio-ftp.html) on roboRIO FTP. The `.revlog` files are logged to `"/home/lvuser/logs/"` on the roboRIO.

#### External USB Drive

If there is a USB drive plugged into the roboRIO, files can be retrieved from the `"/u/logs/"` directory with the flash drive plugged in. Alternatively, the flash drive can be simply unplugged and inserted into any device to access the `.revlog` files.

### Viewing `.revlog` Files

`.revlog` files are not viewable in typical FRC log viewing tools and must first be converted to a `.wpilog`, where the raw CAN data of the `.revlog` is parsed into individual timestamped signals.

The recommended and easiest way is to open `.revlog` files directly in [AdvantageScope](https://docs.advantagescope.org/), where they are automatically converted to `.wpilog` files. See the [AdvantageScope's docs](https://docs.advantagescope.org/whats-new/#rev-robotics-can-log-support) for more information.

The second option is to use the [revlog-converter NPM package](https://www.npmjs.com/package/@rev-robotics/revlog-converter). The NPM package allows you to integrated the converter into any node project while also enabling you to run it as a command line tool if installed globally. See the package documentation for more information.<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.revrobotics.com/revlib/logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
