MCPcopy
hub / github.com/cloudflare/vibesdk / storeLogs

Method storeLogs

container/storage.ts:556–580  ·  view source on GitHub ↗
(logs: ProcessLog[])

Source from the content-addressed store, hash-verified

554 }
555
556 public storeLogs(logs: ProcessLog[]): Result<number[]> {
557 try {
558 const sequences: number[] = [];
559 const transaction = this.db.transaction(() => {
560 for (const log of logs) {
561 const result = this.storeLog(log);
562 if (!result.success) {
563 if ('error' in result) {
564 throw result.error;
565 }
566 throw new Error('Unknown error storing log');
567 }
568 sequences.push(result.data);
569 }
570 });
571
572 transaction();
573 return { success: true, data: sequences };
574 } catch (error) {
575 return {
576 success: false,
577 error: error instanceof Error ? error : new Error('Unknown error storing logs')
578 };
579 }
580 }
581
582 public getLogs(filter: LogFilter = {}): Result<LogRetrievalResponse> {
583 try {

Callers 2

storeLogsMethod · 0.45

Calls 3

storeLogMethod · 0.95
transactionMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected