This is an experimental feature. Use the experimental features endpoint to activate it:

curl \
  -X PATCH 'MEILISEARCH_URL/experimental-features/' \
  -H 'Content-Type: application/json'  \
  --data-binary '{
    "logsRoute": true
  }'

This feature is not available for Meilisearch Cloud users.

Customize log levels

POST
/logs/stderr

Customize logging levels for the default logging system.

Body

NameTypeDefault valueDescription
target *StringN/AA string specifying one or more log type and its log level

Example

curl \
  -X POST MEILISEARCH_URL/logs/stderr \
  -H 'Content-Type: application/json' \
  --data-binary '{
      "target": "milli=trace,index_scheduler=info,actix_web=off"
  }'

Start log stream

POST
/logs/stream

Opens a continuous stream of logs for focused debugging sessions. The stream will continue to run indefinitely until you interrupt it.

Body

NameTypeDefault valueDescription
mode *StringN/ASpecifies either human-readabale or JSON output
target *StringN/AA string specifying one or more log type and its log level

Example

curl \
  -X POST MEILISEARCH_URL/logs/stream \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "mode": "human",
    "target": "index_scheduler=trace"
  }'

Certain HTTP clients such as httpie and xh, will only display data after you have interrupted the stream with the DELETE endpoint.

Interrupt log stream

DELETE
/logs/stream

Interrupt a log stream.

Example

curl \
  -X DELETE MEILISEARCH_URL/logs/stream

Was this page helpful?