程序包 weka.core

类 Debug.Log

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

public static class Debug.Log extends Object implements Serializable, RevisionHandler
A helper class for logging stuff. Uses the java.util.logging package. If this approach seems an "overkill" (it can create quite a few log files if used in different threads), one can use the Debug.SimpleLog class.
版本:
$Revision: 7519 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 构造器概要

    构造器
    构造器
    说明
    Log()
    default constructor, uses only stdout
    Log(String filename)
    creates a logger that logs into the specified file, if null then only stdout is used.
    Log(String filename, int size, int numFiles)
    creates a logger that logs into the specified file, if null then only stdout is used.
  • 方法概要

    修饰符和类型
    方法
    说明
    returns the filename of the log, can be null
    int
    returns the number of files being used
    Returns the revision string.
    int
    returns the size of the files
    void
    log(Level level, String message)
    logs the given message
    void
    log(Level level, String sourceclass, String message)
    prints the given message with the specified level
    void
    log(Level level, String sourceclass, String sourcemethod, String message)
    prints the given message with the specified level
    void
    a convenience method for dumping the current system info in the log file
    static Level
    turns the string representing a level, e.g., "FINE" or "ALL" into the corresponding level (case-insensitive).
    returns a string representation of the logger

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • Log

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

      public Log(String filename)
      creates a logger that logs into the specified file, if null then only stdout is used. It uses 1,000,000 bytes for file size and 1 file.
      参数:
      filename - the file to log into
    • Log

      public Log(String filename, int size, int numFiles)
      creates a logger that logs into the specified file, if null then only stdout is used.
      参数:
      filename - the file to log into
      size - the size of the files in bytes
      numFiles - the number of files for rotating
  • 方法详细资料

    • stringToLevel

      public static Level stringToLevel(String level)
      turns the string representing a level, e.g., "FINE" or "ALL" into the corresponding level (case-insensitive). The default is ALL.
      参数:
      level - the string to return a level for
      返回:
      the corresponding level or the default
    • getFilename

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

      public int getSize()
      returns the size of the files
      返回:
      the size of a file
    • getNumFiles

      public int getNumFiles()
      returns the number of files being used
      返回:
      the number of files
    • log

      public void log(Level level, String message)
      logs the given message
      参数:
      level - the level of severity
      message - the message to log
    • log

      public void log(Level level, String sourceclass, String message)
      prints the given message with the specified level
      参数:
      level - the level of logging
      sourceclass - the class that logs the message
      message - the message to print
    • log

      public void log(Level level, String sourceclass, String sourcemethod, String message)
      prints the given message with the specified level
      参数:
      level - the level of logging
      sourceclass - the class that logs the message
      sourcemethod - the method that logs the message
      message - the message to print
    • 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