Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt

Use this file to discover all available pages before exploring further.

The /api/logs endpoint returns a snapshot of the pipeline’s in-memory log buffer as a JSON array. Log entries are produced by every stage of the pipeline as well as by the top-level job lifecycle ("system" stage), giving you a chronological audit trail of everything the running job has done. The buffer holds the 1000 most recent messages; once full, the oldest entry is discarded to make room for each new one.
GET /api/logs
The log buffer is scoped to the lifetime of the running server process. Restarting the server clears all log history. If you need persistent logs, write them to disk or forward them to an external log sink as they arrive.

Response fields

The endpoint returns a JSON array. Each element is a LogMessage object with the following fields:
timestamp
string
required
ISO 8601 / RFC 3339 timestamp recording when the log entry was created, e.g. "2024-06-01T10:23:45.123Z". Always in UTC.
level
string
required
Severity of the log entry. One of:
  • "INFO" — normal operational messages.
  • "WARN" — unexpected but recoverable conditions.
  • "ERROR" — failures that caused a file to be skipped or a stage to fail.
stage
string
required
Name of the pipeline stage that emitted the message, matching the name field on the corresponding StageInfo object. Top-level lifecycle events (job start, job finish, cancellation) use the value "system".
message
string
required
Human-readable description of the event or error.

Example

curl http://127.0.0.1:8080/api/logs
[
  {
    "timestamp": "2024-06-01T10:23:45.123Z",
    "level": "INFO",
    "stage": "system",
    "message": "Job started"
  },
  {
    "timestamp": "2024-06-01T10:23:45.890Z",
    "level": "INFO",
    "stage": "Exact Duplicate Removal",
    "message": "Stage started: Exact Duplicate Removal"
  },
  {
    "timestamp": "2024-06-01T10:23:51.204Z",
    "level": "WARN",
    "stage": "Exact Duplicate Removal",
    "message": "Could not read file /home/user/photos/corrupt.jpg: unexpected EOF"
  },
  {
    "timestamp": "2024-06-01T10:24:10.500Z",
    "level": "INFO",
    "stage": "Exact Duplicate Removal",
    "message": "Stage completed: 3200 files processed, 142 duplicates removed"
  },
  {
    "timestamp": "2024-06-01T10:24:10.501Z",
    "level": "INFO",
    "stage": "Perceptual Duplicate Detection",
    "message": "Stage started: Perceptual Duplicate Detection"
  }
]
To tail logs in real time without polling, open the SSE stream at GET /api/progress and combine it with periodic calls to this endpoint. The SSE stream omits log messages by design, so use GET /api/logs when you need the full message history.

Build docs developers (and LLMs) love