Class LoggingResource
- java.lang.Object
-
- com.atlassian.confluence.functest.rest.admin.LoggingResource
-
public class LoggingResource extends Object
-
-
Constructor Summary
Constructors Constructor Description LoggingResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLoggingLevel(String loggerName)
boolean
logMessage(String destination, String message)
Log a message to the server's console.String
setLoggingLevel(String loggerName, String level)
Change the level of the specified logger.
-
-
-
Method Detail
-
setLoggingLevel
public String setLoggingLevel(String loggerName, String level)
Change the level of the specified logger.
The level parameter can be one of (case insensitive):
- DEBUG
- INFO
- WARN
- ERROR
- FATAL
- Parameters:
loggerName
- the full name of the logger e.g. com.atlassian.confluence.functest.rest.LoggingResourcelevel
- the level to change the logger to- Returns:
- the original level of the logger before changing.
- Throws:
BadRequestException
- if the incoming loggerName is omitted
-
logMessage
public boolean logMessage(String destination, String message)
Log a message to the server's console.Only administrators can log messages.
The destination of the message has the following valid values:
- info - message will be logged at INFO level
- debug - message will be logged at DEBUG level
- warn - message will be logged at WARN level
- error - message will be logged at ERROR level
- sout - message will be written via System.out.println
- serr - message will be written via System.err.println
- Parameters:
destination
- The destination of the message to be loggedmessage
- The text message to be logged to the console- Returns:
- boolean True if the message is logged (ie destination is a valid level)
-
-