refactor: migrate to winston and enable daily rotated app logs (#71)

This commit is contained in:
vin authored and GitHub committed 2026-02-06 21:10:54 +08:00
1 parent ed94abf0d6
commit 2ae2216f1e
17 files changed
+414 -92

No files matched your search

+3 -2
View File
@@ -1,6 +1,7 @@
import { GeminiPart, Usage, UsageMetadata } from './types';
import { SignatureStore } from './SignatureStore';
import { decodeSignature } from './signature-utils';
import { logger } from '../../utils/logger';
type BlockType = 'None' | 'Text' | 'Thinking' | 'Function';
@@ -249,7 +250,7 @@ export class StreamingState {
const chunks: string[] = [];
this.parseErrorCount++;
console.warn(
logger.warn(
`[SSE-Parser] Parse error #${this.parseErrorCount}. Raw data length: ${rawData.length}`,
);
@@ -260,7 +261,7 @@ export class StreamingState {
// Emit error event if too many errors
if (this.parseErrorCount > 3) {
console.error(
logger.error(
`[SSE-Parser] High error rate (${this.parseErrorCount} errors). Stream may be corrupted.`,
);
chunks.push(