Class GroovyLogReader

  • @Scriptable
    public final class GroovyLogReader
    extends Object
    Parse statistics logs with Groovy.
    • Constructor Detail

      • GroovyLogReader

        public GroovyLogReader()
    • Method Detail

      • getLogDateFromFile

        public static long getLogDateFromFile​(File p_file)
        Get the log time of a file.
        p_file - The file
        The log time in milliseconds since midnight, 1970-01-01 UTC.
      • flushLogQueue

        public static void flushLogQueue()
        Flush the internal log queue to the log file.
      • readLog

        public static void readLog​(File p_file,
                                   groovy.lang.Closure<?> p_closure)
                            throws Exception
        Parse log files and hand over the log entries to a closure.

        The log entries are also the delegate of the given closure.

        p_file - A statistics log file.
        p_closure - A closure that is being called for log entry.