mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
Add a log DB. The goal is just to store our logs in a `.sqlite` DB to make it easier to crawl them and drop the oldest ones.
15 lines
343 B
SQL
15 lines
343 B
SQL
CREATE TABLE logs (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
ts INTEGER NOT NULL,
|
|
ts_nanos INTEGER NOT NULL,
|
|
level TEXT NOT NULL,
|
|
target TEXT NOT NULL,
|
|
message TEXT,
|
|
fields_json TEXT NOT NULL,
|
|
module_path TEXT,
|
|
file TEXT,
|
|
line INTEGER
|
|
);
|
|
|
|
CREATE INDEX idx_logs_ts ON logs(ts DESC, ts_nanos DESC, id DESC);
|