程序包 weka.core
类 Debug.Log
java.lang.Object
weka.core.Debug.Log
- 所有已实现的接口:
Serializable
,RevisionHandler
- 封闭类:
- Debug
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)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明returns the filename of the log, can be nullint
returns the number of files being usedReturns the revision string.int
getSize()
returns the size of the filesvoid
logs the given messagevoid
prints the given message with the specified levelvoid
prints the given message with the specified levelvoid
a convenience method for dumping the current system info in the log filestatic Level
stringToLevel
(String level) turns the string representing a level, e.g., "FINE" or "ALL" into the corresponding level (case-insensitive).toString()
returns a string representation of the logger
-
构造器详细资料
-
Log
public Log()default constructor, uses only stdout -
Log
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
creates a logger that logs into the specified file, if null then only stdout is used.- 参数:
filename
- the file to log intosize
- the size of the files in bytesnumFiles
- the number of files for rotating
-
-
方法详细资料
-
stringToLevel
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
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
logs the given message- 参数:
level
- the level of severitymessage
- the message to log
-
log
prints the given message with the specified level- 参数:
level
- the level of loggingsourceclass
- the class that logs the messagemessage
- the message to print
-
log
prints the given message with the specified level- 参数:
level
- the level of loggingsourceclass
- the class that logs the messagesourcemethod
- the method that logs the messagemessage
- the message to print
-
logSystemInfo
public void logSystemInfo()a convenience method for dumping the current system info in the log file- 另请参阅:
-
toString
returns a string representation of the logger -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-