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.
-
-
Field Summary
-
Fields inherited from class nxt.http.APIServlet.APIRequestHandler
DESCRIPTION_FIELD, MESSAGE_FIELD, NAME_FIELD
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanallowRequiredBlockParameters()protected org.json.simple.JSONStreamAwareprocessRequest(javax.servlet.http.HttpServletRequest req)Process the SetLogging API requestprotected booleanrequireBlockchain()protected booleanrequirePassword()Require the administrator passwordprotected booleanrequirePost()-
Methods inherited from class nxt.http.APIServlet.APIRequestHandler
getAPITags, getFileParameter, getParameters, processRequest, requireFullClient, startDbTransaction
-
-
-
-
Method Detail
-
processRequest
protected org.json.simple.JSONStreamAware processRequest(javax.servlet.http.HttpServletRequest req)
Process the SetLogging API request- Specified by:
processRequestin classAPIServlet.APIRequestHandler- Parameters:
req- API request- Returns:
- API response
-
requirePassword
protected boolean requirePassword()
Require the administrator password- Overrides:
requirePasswordin classAPIServlet.APIRequestHandler- Returns:
- TRUE if the admin password is required
-
requirePost
protected final boolean requirePost()
- Overrides:
requirePostin classAPIServlet.APIRequestHandler
-
allowRequiredBlockParameters
protected boolean allowRequiredBlockParameters()
- Overrides:
allowRequiredBlockParametersin classAPIServlet.APIRequestHandler
-
requireBlockchain
protected boolean requireBlockchain()
- Overrides:
requireBlockchainin classAPIServlet.APIRequestHandler
-
-