Class WatchedFileHandler

java.lang.Object
java.util.logging.Handler
org.yamcs.logging.WatchedFileHandler

public class WatchedFileHandler extends Handler
File handler that watches the file it is logging to. If the file changes, it gets closed and reopened with the same filename.

This handler is useful for when log rotation is to be handled outside of the standard Java Logging system, for example with a program like logrotate. Without the watch-functionality it would keep writing to the old (rotated) file.