Package org.littletonrobotics.junction
Class LogFileUtil
java.lang.Object
org.littletonrobotics.junction.LogFileUtil
Utility functions for managing log file paths.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddPathSuffix(String path, String suffix) Adds a suffix to the given path (e.g.static StringFinds the path to a log file for replay, using the following priorities:
-
Method Details
-
addPathSuffix
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
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.
-