We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1332a9b commit 1b7f0e6Copy full SHA for 1b7f0e6
packages/databricks-sdk-js/src/logging/DefaultLogger.ts
@@ -1,10 +1,21 @@
1
-import {Writable} from "stream";
+import {Transform, Writable} from "stream";
2
import {LogEntry, Logger} from "./types";
3
4
export class DefaultLogger implements Logger {
5
private _stream: Writable;
6
constructor(outputStream?: Writable) {
7
- this._stream = outputStream ?? process.stderr;
+ //set to noop if no stream specified
8
+ this._stream =
9
+ outputStream ??
10
+ new (class extends Writable {
11
+ _write(
12
+ chunk: any,
13
+ encoding: BufferEncoding,
14
+ callback: (error?: Error | null | undefined) => void
15
+ ): void {
16
+ callback();
17
+ }
18
+ })();
19
}
20
21
log(level: string, message?: string, obj?: any) {
0 commit comments