|
RestLink 2.2.0
Powerfull Rest Client for Qt
|
Helper class to create a simple logger for RestLink requests. More...
#include <abstractrequestinterceptor.h>
Inherits RestLink::AbstractRequestInterceptor.
Public Member Functions | |
| LogRequestInterceptor (const char *category, QtMsgType enableForLevel=QtDebugMsg) | |
| Constructs the interceptor with a given logging category and level. | |
| LogRequestInterceptor (QLoggingCategory *category) | |
| Constructs the interceptor using an existing QLoggingCategory pointer. | |
| ~LogRequestInterceptor () | |
| Destructor for LogRequestInterceptor. Deletes the QLoggingCategory if it was created by this interceptor. | |
| void | intercept (AbstractRequestHandler::Method method, Request &request, Body &body) override |
| Logs the HTTP method and request URL. | |
Public Member Functions inherited from RestLink::AbstractRequestInterceptor | |
| virtual | ~AbstractRequestInterceptor ()=default |
Helper class to create a simple logger for RestLink requests.
| RestLink::LogRequestInterceptor::LogRequestInterceptor | ( | const char * | category, |
| QtMsgType | enableForLevel = QtDebugMsg |
||
| ) |
Constructs the interceptor with a given logging category and level.
| category | The logging category name (e.g., "restlink.request"). |
| enableForLevel | The minimum log level for which logging is enabled. |
| RestLink::LogRequestInterceptor::LogRequestInterceptor | ( | QLoggingCategory * | category | ) |
Constructs the interceptor using an existing QLoggingCategory pointer.
| category | Pointer to an existing QLoggingCategory used for logging. Ownership is not transferred; the interceptor will not delete it. |
| RestLink::LogRequestInterceptor::~LogRequestInterceptor | ( | ) |
Destructor for LogRequestInterceptor. Deletes the QLoggingCategory if it was created by this interceptor.
|
overridevirtual |
Logs the HTTP method and request URL.
Sensitive data such as api tokens will never be shown.
Implements RestLink::AbstractRequestInterceptor.