From beea6cbac7cfa44212a19e7dcad07b1935b0d076 Mon Sep 17 00:00:00 2001 From: Shinwoo PARK Date: Tue, 11 Feb 2025 20:46:25 +0900 Subject: [PATCH] feat: add logLevel option for replacement of deprecated skip options --- src/logged.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/logged.ts b/src/logged.ts index daedca3..b20bd8b 100644 --- a/src/logged.ts +++ b/src/logged.ts @@ -1,5 +1,6 @@ import { Logger, + LogLevel, Injectable, Controller, ControllerOptions, @@ -124,15 +125,25 @@ interface FunctionMetadata { } interface OverrideBuildOptions { - /** @deprecated */ + logLevel: { + call: LogLevel | 'skip'; + return: LogLevel | 'skip'; + error: LogLevel | 'skip'; + } + /** @deprecated instead use `{ logLevel: { call: 'skip' } }` */ skipCallLog: boolean; - /** @deprecated */ + /** @deprecated instead use `{ logLevel: { return: 'skip' } }` */ skipReturnLog: boolean; - /** @deprecated */ + /** @deprecated instead use `{ logLevel: { error: 'skip' } }` */ skipErrorLog: boolean; } const defaultOverrideBuildOptions: OverrideBuildOptions = { + logLevel: { + call: 'log', + return: 'log', + error: 'error', + }, skipCallLog: false, skipReturnLog: false, skipErrorLog: false,