diff --git a/src/index.ts b/src/index.ts index 41446e0..a5a24ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,12 +39,12 @@ export class Logestic { */ constructor(options: LogesticOptions = {}) { this.requestedAttrs = []; - this.showLevel = options.showLevel || false; - this.logLevelColour = options.logLevelColour || {}; - this.httpLogging = options.httpLogging || true; - this.explicitLogging = options.explicitLogging || true; + this.showLevel = options.showLevel ?? false; + this.logLevelColour = options.logLevelColour ?? {}; + this.httpLogging = options.httpLogging ?? true; + this.explicitLogging = options.explicitLogging ?? true; - this.setDest(options.dest || Bun.stdout); + this.setDest(options.dest ?? Bun.stdout); } private setDest(dest: BunFile): void {