Package jade.util

Class PerDayFileLogger

  • All Implemented Interfaces:
    Closeable, Flushable, Appendable, AutoCloseable

    public class PerDayFileLogger
    extends PrintStream
    This class is an OutputStream whose output is stored in in different files according to the day it is produced. Existing files, if any, are not rewritten as output is appended at the end of the file.
    Author:
    Giovanni Caire - TILab
    • Constructor Detail

      • PerDayFileLogger

        public PerDayFileLogger​(String file)
                         throws IOException
        Create a new day-based logger.
        Parameters:
        file - The name of the file to write logs to.
        Throws:
        IOException - If some filesystem operation fails.
    • Method Detail

      • print

        public void print​(Object obj)
        Print a Java object to the proper file, replacing the file every new day.
        Overrides:
        print in class PrintStream
        Parameters:
        obj - The Java object to print.
      • print

        public void print​(String str)
        Print a string to the proper file, replacing the file every new day.
        Overrides:
        print in class PrintStream
        Parameters:
        str - The string to print.
      • println

        public void println()
        Print a new line to the proper file, replacing the file every new day.
        Overrides:
        println in class PrintStream
      • println

        public void println​(Object obj)
        Print a Java object and a newline to the proper file, replacing the file every new day.
        Overrides:
        println in class PrintStream
        Parameters:
        obj - The Java object to print.
      • println

        public void println​(String str)
        Print a string and a new line to the proper file, replacing the file every new day.
        Overrides:
        println in class PrintStream
        Parameters:
        str - THe string to print.