{
  "id": "devops/docker-logs",
  "family": "container-logs",
  "description": "Compact docker logs output while preserving early and late log lines.",
  "match": {
    "toolNames": ["exec"],
    "argv0": ["docker"],
    "argvIncludes": [["logs"]]
  },
  "transforms": {
    "stripAnsi": true,
    "dedupeAdjacent": true,
    "trimEmptyEdges": true
  },
  "filters": {
    "keepPatterns": [
      "error|warn|fatal|panic|exception|traceback|timeout|refused|fail",
      "^Caused by:",
      "^Traceback"
    ]
  },
  "summarize": {
    "head": 8,
    "tail": 8
  },
  "failure": {
    "preserveOnFailure": true,
    "head": 14,
    "tail": 14
  },
  "counters": [
    {
      "name": "error",
      "pattern": "error",
      "flags": "i"
    },
    {
      "name": "warning",
      "pattern": "warn",
      "flags": "i"
    }
  ]
}
