---
title: "导出后端日志"
method: GET
path: "/logs/export"
tags: ["设置"]
---

# 导出后端日志

`GET /logs/export`

导出后端最近 10 MiB 原始日志，按时间从旧到新拼接并逐行脱敏后作为纯文本附件返回；日志总量超过上限时会在首行注明截断。脱敏会抹除密钥/token/密码、Authorization/Cookie 头、URL 内嵌凭证、客户端 IP 主机位、用户主目录名等敏感信息，便于用户安全地附到 issue。远程服务器、桌面 Bundle、移动 Bundle 三种模式下均可用（均由同一份后端提供该端点）。无日志文件时返回仅含提示行的文本。

## Response `200`

脱敏后的后端日志（text/plain）

## Other responses

- `500` — 读取日志目录失败

---

[API](https://skmtc.net/songloft-org/apis/songloft-api.md) · [All operations](https://skmtc.net/songloft-org/apis/songloft-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/songloft-org/songloft-api/versions/e4d4950ef665/schema)
