mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil, wpilib] Add FileLogger and log console output (#6977)
This commit is contained in:
@@ -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() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user