Package weka.core

Class Debug.SimpleLog

    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleLog()
      default constructor, uses only stdout
      SimpleLog​(java.lang.String filename)
      Creates a logger that writes into the specified file.
      SimpleLog​(java.lang.String filename, boolean append)
      Creates a logger that writes into the specified file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFilename()
      returns the filename of the log, can be null
      java.lang.String getRevision()
      Returns the revision string.
      void log​(java.lang.String message)
      logs the given message to the file
      void logSystemInfo()
      a convenience method for dumping the current system info in the log file
      java.lang.String toString()
      returns a string representation of the logger
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SimpleLog

        public SimpleLog()
        default constructor, uses only stdout
      • SimpleLog

        public SimpleLog​(java.lang.String filename)
        Creates a logger that writes into the specified file. Appends to the file by default.
        Parameters:
        filename - the file to write to, if null then only stdout is used
      • SimpleLog

        public SimpleLog​(java.lang.String filename,
                         boolean append)
        Creates a logger that writes into the specified file. Appends to the file by default.
        Parameters:
        filename - the file to write to, if null then only stdout is used
        append - if false, the file will be deleted first
    • Method Detail

      • getFilename

        public java.lang.String getFilename()
        returns the filename of the log, can be null
        Returns:
        the filename of the log
      • log

        public void log​(java.lang.String message)
        logs the given message to the file
        Parameters:
        message - the message to log
      • logSystemInfo

        public void logSystemInfo()
        a convenience method for dumping the current system info in the log file
        See Also:
        SystemInfo
      • toString

        public java.lang.String toString()
        returns a string representation of the logger
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of the logger
      • getRevision

        public java.lang.String getRevision()
        Returns the revision string.
        Specified by:
        getRevision in interface RevisionHandler
        Returns:
        the revision