Skip to main content

Logs

DoubleDino Proxy can expose log files safely by transforming sensitive information before returning results.

Logs can contain:

  • Plain text.
  • JSON logs.
  • Mixed text and JSON content.

DoubleDino processes the content and returns transformed output while preserving the original structure where possible.

Endpoint

Use:

/logs

Basic query

Retrieve recent log lines using:

lines

Example:

curl -G "http://localhost:8080/logs" \
--data-urlencode "lines=10" \
-H "x-api-key: your-api-key"

Plain text logs

DoubleDino can transform unstructured log lines.

Example:

Original:

2026-07-21 08:15:40 [ERROR] User login failure for [email protected]

Returned:

2026-07-21 08:15:40 [ERROR] User login failure for [email protected]

The log format remains readable while sensitive values are transformed.

JSON logs

DoubleDino automatically handles structured JSON logs.

Example:

Original:

{
"event": "checkout_completed",
"payload": {
"customer": "Hiroshi Tanaka",
"email": "[email protected]",
"amount": 4250.45
}
}

Returned:

{
"event": "checkout_completed",
"payload": {
"customer": "Xk92Lm",
"email": "[email protected]",
"amount": 4250.45
}
}

JSON structure is preserved.

Mixed log files

Real production log files often contain different formats together.

Example:

2026-07-21 08:12:01 [INFO] Server booted successfully

{
"event": "checkout_completed",
"email": "[email protected]"
}

2026-07-21 08:25:59 [INFO] Worker completed

DoubleDino handles mixed content and transforms each entry appropriately.

Debugging production issues

Logs are often the fastest way to investigate production problems.

Example:

A developer receives:

Order INV-9921-X failed during checkout

They can inspect recent logs through DoubleDino:

curl -G "http://localhost:8080/logs" \
--data-urlencode "lines=100" \
-H "x-api-key: your-api-key"

The returned logs remain useful for debugging while sensitive values are transformed.

Preserving known expressions

Logs support preserved expressions.

If enabled, known phrases can remain visible:

DD_PRESERVED_EXPRESSIONS

Example:

Original:

Customer verification check failed

Returned:

Xk92Lm verification check failed

Excluding JSON keys

For structured JSON logs, known keys can be excluded from transformation.

Example:

DD_EXCLUDE_KEYS=status,code,request_id

Original:

{
"status": 500,
"request_id": "abc123",
"email": "[email protected]"
}

Returned:

{
"status": 500,
"request_id": "abc123",
"email": "[email protected]"
}

Dynamic expressions

If enabled by your administrator:

DD_ALLOW_DYNAMIC_EXPRESSIONS=true

you can provide additional preserved expressions per request.

Example:

-H "x-preserve-expressions: payment_gateway_rejected"

This is useful during active investigations.

Notes

  • DoubleDino does not modify log files.
  • Original log files remain unchanged.
  • Returned content is transformed before leaving DoubleDino.
  • JSON structure is preserved.
  • Mixed text and JSON logs are supported.

Next steps

Continue with:

  • API Reference
  • Data transformation behaviour