Codex 會將 Log 儲存在 SQLite,可透過指令查詢 Log 使用量。
Version
Codex 0.141
File Size
$ ls -lh ~/.codex/logs_2.sqlite*
- 直接看 Log 檔案大小
Log Count
$ sqlite3 ~/.codex/logs_2.sqlite \
'SELECT COUNT(*) FROM logs;'
- 查看資料庫內有多少筆 Log
Estimated Size
$ sqlite3 ~/.codex/logs_2.sqlite \
'SELECT
COUNT(*) AS rows,
SUM(estimated_bytes) AS bytes
FROM logs;
'
- 估算 Log 內容實際大小