[wpiutil, wpilib] Add FileLogger and log console output (#6977)

This commit is contained in:
Gold856
2024-09-13 01:13:06 -04:00
committed by GitHub
parent 32252f7d6a
commit 3bbbf86632
12 changed files with 428 additions and 0 deletions

View File

@@ -217,6 +217,24 @@ public class WPIUtilJNI {
public static native int[] waitForObjectsTimeout(int[] handles, double timeout)
throws InterruptedException;
/**
* Create a native FileLogger. When the specified file is modified, appended data will be appended
* to the specified data log.
*
* @param file path to the file
* @param log data log implementation handle
* @param key log key to append data to
* @return The FileLogger handle.
*/
public static native long createFileLogger(String file, long log, String key);
/**
* Free a native FileLogger. This causes the FileLogger to stop appending data to the log.
*
* @param fileTail The FileLogger handle.
*/
public static native void freeFileLogger(long fileTail);
/** Utility class. */
protected WPIUtilJNI() {}
}