org.encog.plugin.system
Class SystemLoggingPlugin
- java.lang.Object
-
- org.encog.plugin.system.SystemLoggingPlugin
-
- All Implemented Interfaces:
- EncogPluginBase, EncogPluginLogging1
public class SystemLoggingPlugin extends java.lang.Object implements EncogPluginLogging1
This is the built-in logging plugin for Encog. This plugin provides simple file and console logging.
-
-
Field Summary
-
Fields inherited from interface org.encog.plugin.EncogPluginBase
TYPE_LOGGING, TYPE_SERVICE
-
-
Constructor Summary
Constructors Constructor and Description SystemLoggingPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetLogLevel()java.lang.StringgetPluginDescription()java.lang.StringgetPluginName()intgetPluginServiceType()intgetPluginType()static java.lang.StringgetStackTrace(java.lang.Throwable aThrowable)Create a stack trace.voidlog(int level, java.lang.String message)Log the message.voidlog(int level, java.lang.Throwable t)Log a throwable at the specified level.voidsetLogLevel(int level)Set the logging level.voidstartConsoleLogging()Start logging to the console.voidstopLogging()Stop any console or file logging.
-
-
-
Method Detail
-
getStackTrace
public static java.lang.String getStackTrace(java.lang.Throwable aThrowable)
Create a stack trace.- Parameters:
aThrowable- The throwable to create the trace for.- Returns:
- The stack trace as a string.
-
getLogLevel
public final int getLogLevel()
- Specified by:
getLogLevelin interfaceEncogPluginLogging1- Returns:
- The current log level.
-
getPluginDescription
public final java.lang.String getPluginDescription()
- Specified by:
getPluginDescriptionin interfaceEncogPluginBase- Returns:
- The plugin description.
-
getPluginName
public final java.lang.String getPluginName()
- Specified by:
getPluginNamein interfaceEncogPluginBase- Returns:
- The name of the plugin.
-
getPluginType
public final int getPluginType()
- Specified by:
getPluginTypein interfaceEncogPluginBase- Returns:
- This is a type-1 plugin.
-
log
public final void log(int level, java.lang.String message)Log the message.- Specified by:
login interfaceEncogPluginLogging1- Parameters:
level- The logging level.message- The logging message.
-
log
public final void log(int level, java.lang.Throwable t)Log a throwable at the specified level.- Specified by:
login interfaceEncogPluginLogging1- Parameters:
level- The level to log at.t- The error to log.
-
setLogLevel
public final void setLogLevel(int level)
Set the logging level.- Parameters:
level- The logging level.
-
startConsoleLogging
public final void startConsoleLogging()
Start logging to the console.
-
stopLogging
public final void stopLogging()
Stop any console or file logging.
-
getPluginServiceType
public int getPluginServiceType()
- Specified by:
getPluginServiceTypein interfaceEncogPluginBase- Returns:
- The service type provided by this plugin.
-
-
DMelt 3.0 © DataMelt by jWork.ORG