Skip to content

Commit 39b01ad

Browse files
authored
fix: prevent logging for empty messages (#38)
1 parent 4325ffe commit 39b01ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ export class Logestic<K extends keyof Attribute = keyof Attribute> {
167167
}
168168

169169
private async log(msg: string): Promise<void> {
170+
// ignore empty logs
171+
if (!msg || msg === "") return
172+
170173
const msgNewLine = `${msg}\n`;
171174
if (!this.dest.name || !this.dest.name.length) {
172175
// This is either stdout or stderr

0 commit comments

Comments
 (0)