com.atlassian.confluence.it.system
Class LogAdjuster

java.lang.Object
  extended by com.atlassian.confluence.it.system.LogAdjuster

public class LogAdjuster
extends java.lang.Object

Adjusts and resets log levels of the system. Definitely isn't thread-safe.


Constructor Summary
LogAdjuster(java.lang.String baseUrl)
          Requires the base url of the server in order to log in a ConfluenceRpc.
 
Method Summary
 void resetLogLevels()
          Undoes all level setting by this LogAdjuster.
 void setLogLevel(java.lang.String logger, org.apache.log4j.Level level)
          Adjust the log level for a given logger pattern.
 void suppressMultipartRequestLogging()
          Convenience method to change logging of the com.opensymphony.webwork.dispatcher.multipart.MultiPartRequest to Level.ERROR, which is very commonly performed to suppress its noisy logging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogAdjuster

public LogAdjuster(java.lang.String baseUrl)
Requires the base url of the server in order to log in a ConfluenceRpc.

Method Detail

setLogLevel

public void setLogLevel(java.lang.String logger,
                        org.apache.log4j.Level level)
Adjust the log level for a given logger pattern. It will be reset by a subsequent call to resetLogLevels(), which should be called in a finally or a tearDown.


suppressMultipartRequestLogging

public void suppressMultipartRequestLogging()
Convenience method to change logging of the com.opensymphony.webwork.dispatcher.multipart.MultiPartRequest to Level.ERROR, which is very commonly performed to suppress its noisy logging. This call should be matched with a call to resetLogLevels() in the finally or tearDown.


resetLogLevels

public void resetLogLevels()
Undoes all level setting by this LogAdjuster. Clears its state, so a new LogAdjuster is not required each time.



Copyright © 2003-2014 Atlassian. All Rights Reserved.