API 參考

App Logs

讀取和清除 PlainApp 的滾動日誌檔案。用於除錯——僅限開發者模式。

型別定義

bash
# appLogs returns an array of plain strings (one per log line, newest-first).
# appLogPath returns the absolute path of the current log file on the device.

操作

query

appLogs

從滾動日誌檔案讀取日誌行,最新的在前。使用 offset/limit 進行分頁。

bash
query GetAppLogs($offset: Int!, $limit: Int!) {
  appLogs(offset: $offset, limit: $limit)
}
query

appLogPath

取得目前日誌檔案的絕對檔案系統路徑。

bash
query GetAppLogPath {
  appLogPath
}
mutation

clearAppLogs

清空目前日誌檔案。

bash
mutation ClearAppLogs {
  clearAppLogs
}