The FileHandler class flushes the file in configurable intervals (default is 5 seconds).