From bf1f0475a296fe94bb608312b036488e7f23ce2c Mon Sep 17 00:00:00 2001 From: Kazuhito Hokamura Date: Fri, 5 Jul 2024 19:12:48 +0900 Subject: [PATCH] format --- src/index.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index ea16f85..794b728 100644 --- a/src/index.ts +++ b/src/index.ts @@ -308,7 +308,11 @@ export class StructuredLogger implements LoggerService { } // error(message: string, error: Error, ...params) - if (args.length > 1 && typeof args[0] === "string" && args[1] instanceof Error) { + if ( + args.length > 1 && + typeof args[0] === "string" && + args[1] instanceof Error + ) { const message = args[0]; const err = args[1]; const params = args.slice(2); @@ -318,15 +322,15 @@ export class StructuredLogger implements LoggerService { message, stack: err.stack, context: last, - params: params.slice(0, -1).concat([{ error: err.toString() }]) - } + params: params.slice(0, -1).concat([{ error: err.toString() }]), + }; } else { return { message, stack: err.stack, context: null, - params: params.concat([{ error: err.toString() }]) - } + params: params.concat([{ error: err.toString() }]), + }; } }