MCPcopy
hub / github.com/mastra-ai/mastra / _write

Method _write

deployers/cloud/src/utils/logger.ts:43–53  ·  view source on GitHub ↗
(chunk: any, encoding?: string, callback?: (error?: Error | null) => void)

Source from the content-addressed store, hash-verified

41 }
42
43 _write(chunk: any, encoding?: string, callback?: (error?: Error | null) => void): boolean {
44 if (typeof callback === 'function') {
45 this._transform(chunk, encoding || 'utf8', callback);
46 return true;
47 }
48
49 this._transform(chunk, encoding || 'utf8', (error: Error | null | undefined) => {
50 if (error) console.error('Transform error in write:', error);
51 });
52 return true;
53 }
54
55 async _flush(): Promise<void> {
56 // // Ensure the pipeline is closed and flushed

Callers

nothing calls this directly

Calls 2

_transformMethod · 0.95
errorMethod · 0.65

Tested by

no test coverage detected