Class LogFileUtil

java.lang.Object
org.littletonrobotics.junction.LogFileUtil

public class LogFileUtil extends Object
Utility functions for managing log file paths.
  • Method Details

    • addPathSuffix

      public static String addPathSuffix(String path, String suffix)
      Adds a suffix to the given path (e.g. "test.wpilog" -> "test_sim.wpilog"). If the input path already contains the suffix, an index will be added instead.
      Parameters:
      path - The base path, such as "test.wpilog".
      suffix - The suffix to add, such as "_sim".
      Returns:
      The new path.
    • findReplayLog

      public static String findReplayLog()
      Finds the path to a log file for replay, using the following priorities:

      1. The value of the "AKIT_LOG_PATH" environment variable, if set

      2. The file currently open in AdvantageScope, if available

      3. The result of the prompt displayed to the user

      Returns:
      The path to the log file.