mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-28 03:00:29 -04:00
17 lines
325 B
TypeScript
17 lines
325 B
TypeScript
import { db } from '@/db'
|
|
import { workflowLogs } from '@/db/schema'
|
|
|
|
export interface LogEntry {
|
|
id: string
|
|
workflowId: string
|
|
executionId: string
|
|
level: string
|
|
message: string
|
|
createdAt: Date
|
|
duration?: string
|
|
}
|
|
|
|
export async function persistLog(log: LogEntry) {
|
|
await db.insert(workflowLogs).values(log)
|
|
}
|