Sending Logs

You can send logs through a simple HTTP(s) API or send all server logs with our CL Agent

Sending logs through HTTP(s) API

Send a single simple log message:

curl -X POST http://localhost:8080/api/v1/log/{log-source-token} -d "this is a log entry"

Send structured logs in JSON:

curl -X POST http://localhost:8080/api/v1/log/{log-source-token} -d '{"level": "error", "msg": "something went wrong"}'

Send a bunch of logs from a file:

curl -X POST http://localhost:8080/api/v1/ingest_logs/{log-source-token} -d @mylogs.txt

This will make a log entry for every line of text sent separated by new line.

You can also pass the token as a Bearer token in the Authorization header instead of the URL:

curl -X POST http://localhost:8080/api/v1/ingest_logs \
    -H "Authorization: Bearer {log-source-token}" \
    -d @mylogs.txt

You can send compressed logs with gzip:

curl -X POST https://localhost:8080/api/v1/ingest_logs/{log-source-token} --data-binary @mylogs.gz

Log Transformation

You can apply a JavaScript transformation to incoming logs. This is useful for parsing, filtering, or restructuring log lines before they are stored.

Transform scripts are configured per log source in the source settings. You can test transformations from the web UI before saving them.

The script receives each log line as input and must return the transformed output. Scripts have a 1 second execution timeout per log line.

💌 Get notified on new features and updates

Only sent when a new version is released. Nothing else.