Class LogAdjuster
- java.lang.Object
-
- com.atlassian.confluence.it.system.LogAdjuster
-
public class LogAdjuster extends Object
Adjusts and resets log levels of the system. Definitely isn't thread-safe.
-
-
Constructor Summary
Constructors Constructor Description LogAdjuster(String baseUrl)Requires the base url of the server in order to log in a ConfluenceRpc.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidresetLogLevels()Undoes all level setting by this LogAdjuster.voidsetLogLevel(String logger, LoggingAndProfiling.LogLevel level)Adjust the log level for a given logger pattern.voidsetLogLevel(String logger, org.apache.log4j.Level level)Deprecated.since 7.5 UsesetLogLevel(String, LogLevel)voidsuppressMultipartRequestLogging()Convenience method to change logging of theorg.apache.struts2.dispatcher.multipart.MultiPartRequesttoLoggingAndProfiling.LogLevel.ERROR, which is very commonly performed to suppress its noisy logging.
-
-
-
Constructor Detail
-
LogAdjuster
public LogAdjuster(String baseUrl)
Requires the base url of the server in order to log in a ConfluenceRpc.
-
-
Method Detail
-
setLogLevel
public void setLogLevel(String logger, LoggingAndProfiling.LogLevel level)
Adjust the log level for a given logger pattern. It will be reset by a subsequent call toresetLogLevels(), which should be called in a finally or a tearDown.- Since:
- 7.5
-
setLogLevel
@Deprecated public void setLogLevel(String logger, org.apache.log4j.Level level)
Deprecated.since 7.5 UsesetLogLevel(String, LogLevel)Adjust the log level for a given logger pattern. It will be reset by a subsequent call toresetLogLevels(), which should be called in a finally or a tearDown.
-
suppressMultipartRequestLogging
public void suppressMultipartRequestLogging()
Convenience method to change logging of theorg.apache.struts2.dispatcher.multipart.MultiPartRequesttoLoggingAndProfiling.LogLevel.ERROR, which is very commonly performed to suppress its noisy logging. This call should be matched with a call toresetLogLevels()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.
-
-