Class: LoggingUtils

LoggingUtils()

Utilities related to logging.

Constructor

new LoggingUtils()

Author:
  • Mihail Radkov
Source:

Methods

(static) getLogPayload(response, paramsopt) → {object}

Creates an object from the provided HTTP response that is suitable for structured logging.

Any additional key-value entries from params will be assigned in the created payload object.

Parameters:
Name Type Attributes Description
response HttpResponse

the HTTP response. Used to get the execution time and the base URL

params object <optional>

additional parameters to be appended

Source:
Returns:

the constructed payload object for logging

Type
object