org.encog.plugin.system
Class SystemLoggingPlugin

java.lang.Object
  extended by org.encog.plugin.system.SystemLoggingPlugin
All Implemented Interfaces:
EncogPluginBase, EncogPluginLogging1

public class SystemLoggingPlugin
extends 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
SystemLoggingPlugin()
           
 
Method Summary
 int getLogLevel()
          
 String getPluginDescription()
          
 String getPluginName()
          
 int getPluginServiceType()
           
 int getPluginType()
           
static String getStackTrace(Throwable aThrowable)
          Create a stack trace.
 void log(int level, String message)
          Log the message.
 void log(int level, Throwable t)
          Log a throwable at the specified level.
 void setLogLevel(int level)
          Set the logging level.
 void startConsoleLogging()
          Start logging to the console.
 void stopLogging()
          Stop any console or file logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemLoggingPlugin

public SystemLoggingPlugin()
Method Detail

getStackTrace

public static String getStackTrace(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:
getLogLevel in interface EncogPluginLogging1
Returns:
The current log level.

getPluginDescription

public final String getPluginDescription()

Specified by:
getPluginDescription in interface EncogPluginBase
Returns:
The plugin description.

getPluginName

public final String getPluginName()

Specified by:
getPluginName in interface EncogPluginBase
Returns:
The name of the plugin.

getPluginType

public final int getPluginType()
Specified by:
getPluginType in interface EncogPluginBase
Returns:
This is a type-1 plugin.

log

public final void log(int level,
                      String message)
Log the message.

Specified by:
log in interface EncogPluginLogging1
Parameters:
level - The logging level.
message - The logging message.

log

public final void log(int level,
                      Throwable t)
Log a throwable at the specified level.

Specified by:
log in interface EncogPluginLogging1
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:
getPluginServiceType in interface EncogPluginBase
Returns:
The service type provided by this plugin.


Copyright © 2014. All Rights Reserved.