Class LoggingResource


  • public class LoggingResource
    extends Object
    • Constructor Detail

      • LoggingResource

        public LoggingResource()
    • Method Detail

      • getLoggingLevel

        public String getLoggingLevel​(String loggerName)
      • 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.LoggingResource
        level - 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 logged
        message - The text message to be logged to the console
        Returns:
        boolean True if the message is logged (ie destination is a valid level)