org.wso2.wsas.admin.service.logging
Class LoggingAdmin

java.lang.Object
  extended by org.wso2.wsas.admin.service.logging.LoggingAdmin

public class LoggingAdmin
extends java.lang.Object

This is the Admin service used for obtaining Log4J information about the system and also used for managing the system Log4J configuration


Constructor Summary
LoggingAdmin()
           
 
Method Summary
 LoggerData[] getAllLoggerData(java.lang.String logNameFilter, boolean beginsWith)
           
 AppenderData getAppenderData(java.lang.String appenderName)
           
 LoggerData getLoggerData(java.lang.String loggerName)
           
 LogData getSystemLog()
          Get all the information regarding the system log4j information but Logger information such as logger, parent logger, effective level and additivity.
 void restoreDefaults()
           
 void updateAllAppenderData(java.lang.String appenderName, java.lang.String appenderPattern, java.lang.String threshold, java.lang.String logFileName, java.lang.String sysLogHost, java.lang.String facility, boolean persist)
          Set the Appender information.
 void updateLoggerData(java.lang.String loggerName, java.lang.String loggerLevel, boolean additivity, boolean persist)
           
 void updateSystemLog(java.lang.String logLevel, java.lang.String logPattern, boolean persist)
          Globally update the System Logging configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingAdmin

public LoggingAdmin()
Method Detail

updateSystemLog

public void updateSystemLog(java.lang.String logLevel,
                            java.lang.String logPattern,
                            boolean persist)
Globally update the System Logging configuration. The global logging level & the log pattern will be changed by this method

Parameters:
logLevel - The global log level to be set
logPattern - The global log pattern to be set
persist - true - indicates persist these changes to the DB; false - indicates make changes only in memory and do not persist the changes to DB

getAppenderData

public AppenderData getAppenderData(java.lang.String appenderName)
Parameters:
appenderName - The name of the appender
Returns:
The appender information the given appender with name appenderName

getLoggerData

public LoggerData getLoggerData(java.lang.String loggerName)

updateAllAppenderData

public void updateAllAppenderData(java.lang.String appenderName,
                                  java.lang.String appenderPattern,
                                  java.lang.String threshold,
                                  java.lang.String logFileName,
                                  java.lang.String sysLogHost,
                                  java.lang.String facility,
                                  boolean persist)
                           throws org.apache.axis2.AxisFault
Set the Appender information. We receive all the parameters from the update appenders method but we have to only update the relevent data.

Parameters:
appenderName - The name of the Appender
appenderPattern - The log pattern
threshold - The logging threshold
logFileName - log file name - Only relevant to FileAppenders
sysLogHost - The Syslog host - Only relevant to SyslogAppenders
facility - The Syslog facility - Only relevant to SyslogAppenders
persist - true - indicates persist these changes to the DB; false - indicates make changes only in memory and do not persist the changes to DB
Throws:
org.apache.axis2.AxisFault - If failure occurs during setting of these values

updateLoggerData

public void updateLoggerData(java.lang.String loggerName,
                             java.lang.String loggerLevel,
                             boolean additivity,
                             boolean persist)

getSystemLog

public LogData getSystemLog()
Get all the information regarding the system log4j information but Logger information such as logger, parent logger, effective level and additivity. As this information is abundant, rendering SOAP env will be expensive and time consuming.

Returns:
System log information

restoreDefaults

public void restoreDefaults()
                     throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

getAllLoggerData

public LoggerData[] getAllLoggerData(java.lang.String logNameFilter,
                                     boolean beginsWith)