程序包 weka.core

类 Debug.SimpleLog

java.lang.Object
weka.core.Debug.SimpleLog
所有已实现的接口:
Serializable, RevisionHandler
封闭类:
Debug

public static class Debug.SimpleLog extends Object implements Serializable, RevisionHandler
A little, simple helper class for logging stuff. Uses simple file access and not the java.util.logging stuff (see Log for that). Uses the writeToFile methods of the Debug class.
另请参阅:
  • 构造器详细资料

    • SimpleLog

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

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

      public SimpleLog(String filename, boolean append)
      Creates a logger that writes into the specified file. Appends to the file by default.
      参数:
      filename - the file to write to, if null then only stdout is used
      append - if false, the file will be deleted first
  • 方法详细资料

    • getFilename

      public String getFilename()
      returns the filename of the log, can be null
      返回:
      the filename of the log
    • log

      public void log(String message)
      logs the given message to the file
      参数:
      message - the message to log
    • logSystemInfo

      public void logSystemInfo()
      a convenience method for dumping the current system info in the log file
      另请参阅:
    • toString

      public String toString()
      returns a string representation of the logger
      覆盖:
      toString 在类中 Object
      返回:
      a string representation of the logger
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision