SnapLogs

Importer des logs

Charger un historique de logs dans SnapLogs — fichier, API ou n8n. 500 lignes par envoi.

Un testeur qui a déjà des logs (export n8n, fichier applicatif, dump console) peut les historiser dans SnapLogs sans les recréer un par un.

Depuis l’app

  1. app.snaplogs.proCapturer → n8n
  2. Choisis le projet.
  3. Importer des logs : fichier .json, .jsonl, .ndjson, .txt, .log — ou colle le texte.
  4. Source par défaut (n8n, agent, other…).
  5. Importer

Formats acceptés :

  • Tableau JSON : [{ "message": "Timeout", "level": "error", "created_at": "2026-08-14T10:00:00Z" }]
  • Enveloppe : { "logs": [ … ] }
  • NDJSON : un objet JSON par ligne
  • Texte brut : une ligne = un log. Si la ligne commence par un timestamp ISO + un niveau (ERROR, WARN…), ils sont extraits.

Champs reconnus : message / msg / text / error, level / severity, source, created_at / timestamp, stack, workflow_id, execution_id.

Limites : 500 logs par envoi, ~1,5 Mo de texte. Les execution_id déjà importés sont ignorés. Les feedbacks auto sont off par défaut (max 20 si tu les actives).

API

curl -X POST "https://app.snaplogs.pro/api/v1/logs/import" \
  -H "x-snaplogs-key: sk_…" \
  -H "Content-Type: application/json" \
  -d '{
    "logs": [
      { "level": "error", "message": "Timeout checkout", "created_at": "2026-08-14T10:00:00Z" },
      { "level": "info", "message": "Job started", "source": "n8n" }
    ]
  }'

Dump texte :

curl -X POST "https://app.snaplogs.pro/api/v1/logs/import" \
  -H "x-snaplogs-key: sk_…" \
  -H "Content-Type: application/json" \
  -d '{"default_source":"other","content":"2026-08-14T10:00:00Z ERROR Timeout\nJob started"}'

Une ligne à la fois (live) : POST /api/v1/logs.

Depuis n8n

Community node → Resource Log → Operation Import. Voir n8n.