Skip to main content

Event Types

Rilog intercepts and stores five categories of events. Four are captured automatically, one is sent manually.

TypeTriggerAutomatic
REQUESTHTTP requests via fetch or axiosYes
CLICKClicks on <button> and <a> elementsYes
CONSOLE_ERRORconsole.error() callsYes
CONSOLE_WARNconsole.warn() callsYes
DEBUG_MESSAGEManual call via rilog.logData()No

REQUEST (HTTP request)

Captured automatically for every fetch request. For axios, manual wiring is required via rilog.interceptRequestAxios() and rilog.interceptResponseAxios().

FieldDescription
methodHTTP method (GET, POST, PUT, DELETE, etc.)
urlFull request URL
requestHeadersRequest headers (only those listed in config.headers)
requestBodyRequest body
statusHTTP response status code
responseBodyResponse body
{
"type": "REQUEST",
"method": "POST",
"url": "https://api.myapp.com/users",
"requestBody": { "email": "user@example.com" },
"status": 201,
"responseBody": { "id": "usr_123" }
}

CLICK

Captured automatically on every click on a <button> or <a> element.

{
"type": "CLICK",
"target": "button",
"text": "Submit"
}

To disable: config.disableClickInterceptor: true


CONSOLE_ERROR

Captured on every console.error() call. Original output in DevTools is preserved.

{
"type": "CONSOLE_ERROR",
"args": ["Something went wrong", { "code": 500 }]
}

CONSOLE_WARN

Captured on every console.warn() call. Original output in DevTools is preserved.

{
"type": "CONSOLE_WARN",
"args": ["Deprecated API used"]
}

To disable both console interceptors: config.disableConsoleInterceptor: true


DEBUG_MESSAGE (custom event)

Sent manually via rilog.logData(). Used to log arbitrary data at specific points in your code. Automatically captures a stack trace from the call site (source maps improve readability).

rilog.logData({ userId: 'usr_456', step: 'checkout' }, { label: 'purchase-flow' });
ParameterTypeRequiredDescription
dataanyYesAny value; objects are serialised automatically
labelstringYesLabel for filtering events in the dashboard
{
"type": "DEBUG_MESSAGE",
"label": "purchase-flow",
"data": { "userId": "usr_456", "step": "checkout" }
}