-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlogs.ts
15 lines (14 loc) · 972 Bytes
/
logs.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { sqliteTable, integer, text } from "drizzle-orm/sqlite-core"
/**
* Application logs. In place/addition of them being shown on the terminal, logs gets recorded.
*/
export const logs = sqliteTable('logs', {
id: integer().primaryKey({ autoIncrement: true }), //Unique id for the message
session: integer().notNull(), //Session id, each instance of vs is a new session
level: integer().notNull(), //Message level
type: integer().notNull(), //Message type
what: text(), //Message explanation
root: text(), //Current app root
path: text(), //Current path in the app where the message was triggered
timestamp: integer({ mode: 'timestamp_ms' }).notNull(), //When the message was recorded
});