nxt.http

## Class SetLogging

- java.lang.Object
- - nxt.http.APIServlet.APIRequestHandler
  - - nxt.http.SetLogging

-     public class SetLogging
      extends APIServlet.APIRequestHandler

  The SetLogging API will set the NRS log level for all log messages. It will also set the communication events that are logged.

  Request parameters:

  - logLevel - Specifies the log message level and defaults to INFO if not specified.
  - communicationLogging - Specifies peer message logging and defaults to no communication logging if not specified. The log level is a bit mask and more than one bit may be set. The bits are defined as follows:
    - 1 - Log network message names
    - 2 - Log network message details

  Response parameters:

  - loggingUpdated - Set to 'true' if the logging was updated.

  The following log levels can be specified:

  - DEBUG - Debug, informational, warning and error messages will be logged.
  - INFO - Informational, warning and error messages will be logged.
  - WARN - Warning and error messages will be logged.
  - ERROR - Error messages will be logged.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `allowRequiredBlockParameters()`
    `protected boolean` | `isChainSpecific()`
    `protected org.json.simple.JSONStreamAware` | `processRequest(javax.servlet.http.HttpServletRequest req)` Process the SetLogging API request
    `protected boolean` | `requireBlockchain()`
    `protected boolean` | `requirePassword()` Require the administrator password
    `protected boolean` | `requirePost()`

    - ### Methods inherited from class nxt.http.APIServlet.APIRequestHandler

      `getAPITags, getFileParameter, getParameters, isIgnisOnly, isPassword, isTextArea, processRequest, requireFullClient, startDbTransaction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### processRequest

          protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
                                                            throws ParameterException

      Process the SetLogging API request
      Specified by:
        `processRequest` in class `APIServlet.APIRequestHandler`
      Parameters:
        `req` - API request
      Returns:
        API response
      Throws:
        `ParameterException` - Invalid parameter value

    - #### requirePassword

          protected boolean requirePassword()

      Require the administrator password
      Overrides:
        `requirePassword` in class `APIServlet.APIRequestHandler`
      Returns:
        TRUE if the admin password is required

    - #### requirePost

          protected final boolean requirePost()

      Overrides:
        `requirePost` in class `APIServlet.APIRequestHandler`

    - #### allowRequiredBlockParameters

          protected boolean allowRequiredBlockParameters()

      Overrides:
        `allowRequiredBlockParameters` in class `APIServlet.APIRequestHandler`

    - #### requireBlockchain

          protected boolean requireBlockchain()

      Overrides:
        `requireBlockchain` in class `APIServlet.APIRequestHandler`

    - #### isChainSpecific

          protected boolean isChainSpecific()

      Overrides:
        `isChainSpecific` in class `APIServlet.APIRequestHandler`