mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
feat(logs): added block output to db
This commit is contained in:
@@ -150,9 +150,9 @@ export function useWorkflowExecution() {
|
||||
// Prepare logs for persistence (moved after notification)
|
||||
const blockLogs = (result.logs || []).map((log) => ({
|
||||
level: log.success ? 'info' : 'error',
|
||||
message: `Block ${log.blockName || log.blockId} (${log.blockType}): ${
|
||||
log.error || 'Completed successfully'
|
||||
}`,
|
||||
message: log.success
|
||||
? `Block ${log.blockName || log.blockId} (${log.blockType}): ${JSON.stringify(log.output?.response || {})}`
|
||||
: `Block ${log.blockName || log.blockId} (${log.blockType}): ${log.error || 'Failed'}`,
|
||||
duration: log.success ? `${log.durationMs}ms` : 'NA',
|
||||
createdAt: new Date(log.endedAt || log.startedAt).toISOString(),
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user