Package nxt.http

Class 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.