---
title: "Get the content of a log file"
method: GET
path: "/api/logs/{file}"
tags: ["Logs"]
---

# Get the content of a log file

`GET /api/logs/{file}`

## Path parameters

- `file` string, required

## Query parameters

- `limit` integer
- `offset` integer
- `channels` string
- `levels` string

## Response `200`

The log file content

- object
  - `name` string — The file name without extension.
  - `size` integer — The file size in bytes
  - `mtime` string — Last modification date of the file
  - `lines` integer — Number of lines in the log file
  - `content` object[]
    - `datetime` string
    - `channel` string
    - `level` string
    - `message` string
    - `context` object, nullable
    - `extra` object

## Other responses

- `404` — If the file was not found

## Changes

- **2025-03-06** `4dc3bf84edf7` — 2 info
  - the endpoint scheme security `CookieAuthentication` was added to the API
  - the endpoint scheme security `TokenAuthentication` was added to the API
- **2023-11-09** `45872e569bf0` — 1 breaking
  - the response property `allOf[subschema #2]/content/items/oneOf[#/components/schemas/LogRecord]/context` became nullable for the status `200`
- **2023-04-24** `98919748e600` — 1 info
  - endpoint added
- **2020-07-23** `42c41034504b` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/contao/apis/contao-manager-api/changes/api/logs/:file/get.md)

---

[API](https://skmtc.dev/contao/apis/contao-manager-api.md) · [All operations](https://skmtc.dev/contao/apis/contao-manager-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contao/contao-manager-api/revisions/074d8046de13/schema)
