Logs
DoubleDino can expose log files through the /logs endpoint.
Logs can contain plain text, JSON, or mixed content. DoubleDino transforms the returned content while preserving its structure where possible.
Query logs
Use the lines parameter to retrieve recent log lines:
curl -G "http://localhost:8080/logs" \
--data-urlencode "lines=10" \
-H "x-api-key: your-api-key"
DoubleDino reads the requested log content, transforms it, and returns the result. The original log file is not modified.
Plain text
Plain text log entries are transformed while remaining readable.
For example:
2026-07-21 08:15:40 [ERROR] User login failure for [email protected]
can become:
2026-07-21 08:15:40 [ERROR] User login failure for [email protected]
JSON logs
JSON log entries are transformed recursively, including nested objects and arrays.
For example:
{
"event": "checkout_completed",
"payload": {
"customer": "Alice",
"amount": 4250.45
}
}
can become:
{
"event": "checkout_completed",
"payload": {
"customer": "Dkyr",
"amount": 4250.45
}
}
The JSON structure remains intact.
Mixed logs
A log file can contain different formats. DoubleDino processes the content and transforms values in both plain text and structured JSON entries.
Preserved expressions
Administrators can configure expressions that remain unchanged using DD_PRESERVED_EXPRESSIONS.
If dynamic expressions are enabled, developers can also provide additional expressions for a request using the x-preserve-expressions header:
curl -G "http://localhost:8080/logs" \
--data-urlencode "lines=100" \
-H "x-api-key: your-api-key" \
-H "x-preserve-expressions: payment_gateway_rejected"
Dynamic expressions are available only when the administrator has enabled:
DD_ALLOW_DYNAMIC_EXPRESSIONS=true
Only use this when you need additional expressions to remain visible. Developers cannot change expressions configured by the administrator.
Excluding JSON keys
Administrators can configure JSON keys that should not be transformed using DD_EXCLUDE_KEYS.
For example:
DD_EXCLUDE_KEYS=status,code,request_id
Given:
{
"status": 500,
"request_id": "abc123",
}
the excluded keys remain unchanged while other values are transformed:
{
"status": 500,
"request_id": "abc123",
}
Read-only
DoubleDino does not modify log files.
The requested content is read, transformed inside DoubleDino, and returned to the client. The original logs remain unchanged.