Package 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.
- communicationEvent - Specifies a communication event to be logged and defaults to no communication logging if not specified. This parameter can be specified multiple times to log multiple communication events.
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.
The following communication events can be specified. This is a bit mask so multiple events can be enabled at the same time. The log level must be DEBUG or INFO for communication events to be logged.
- EXCEPTION - Log HTTP exceptions.
- HTTP-ERROR - Log non-200 HTTP responses.
- HTTP-OK - Log HTTP 200 responses.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
allowRequiredBlockParameters()
protected org.json.simple.JSONStreamAware
processRequest(javax.servlet.http.HttpServletRequest req)
Process the SetLogging API requestprotected boolean
requireBlockchain()
protected boolean
requirePassword()
Require the administrator passwordprotected boolean
requirePost()
-
Methods inherited from class nxt.http.APIServlet.APIRequestHandler
getAPITags, getFileParameter, getParameters, isPassword, isTextArea, processRequest, requireFullClient, startDbTransaction
-
-
-
-
Method Detail
-
processRequest
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
Process the SetLogging API request- Specified by:
processRequest
in classAPIServlet.APIRequestHandler
- Parameters:
req
- API request- Returns:
- API response
-
requirePassword
protected boolean requirePassword()
Require the administrator password- Overrides:
requirePassword
in classAPIServlet.APIRequestHandler
- Returns:
- TRUE if the admin password is required
-
requirePost
protected final boolean requirePost()
- Overrides:
requirePost
in classAPIServlet.APIRequestHandler
-
allowRequiredBlockParameters
protected boolean allowRequiredBlockParameters()
- Overrides:
allowRequiredBlockParameters
in classAPIServlet.APIRequestHandler
-
requireBlockchain
protected boolean requireBlockchain()
- Overrides:
requireBlockchain
in classAPIServlet.APIRequestHandler
-
-