From d423da62b4ffb7568b3de0722cb2f3e84a8e9908 Mon Sep 17 00:00:00 2001 From: Shinwoo PARK Date: Tue, 11 Feb 2025 21:06:06 +0900 Subject: [PATCH] refactor: made new LogLevel options flat --- src/logged.ts | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/logged.ts b/src/logged.ts index b20bd8b..b13d378 100644 --- a/src/logged.ts +++ b/src/logged.ts @@ -125,25 +125,21 @@ interface FunctionMetadata { } interface OverrideBuildOptions { - logLevel: { - call: LogLevel | 'skip'; - return: LogLevel | 'skip'; - error: LogLevel | 'skip'; - } - /** @deprecated instead use `{ logLevel: { call: 'skip' } }` */ + callLogLevel: LogLevel | 'skip'; + returnLogLevel: LogLevel | 'skip'; + errorLogLevel: LogLevel | 'skip'; + /** @deprecated use `callLogLevel: 'skip'` instead */ skipCallLog: boolean; - /** @deprecated instead use `{ logLevel: { return: 'skip' } }` */ + /** @deprecated use `returnLogLevel: 'skip'` instead */ skipReturnLog: boolean; - /** @deprecated instead use `{ logLevel: { error: 'skip' } }` */ + /** @deprecated use `errorLogLevel: 'skip'` instead */ skipErrorLog: boolean; } const defaultOverrideBuildOptions: OverrideBuildOptions = { - logLevel: { - call: 'log', - return: 'log', - error: 'error', - }, + callLogLevel: 'log', + returnLogLevel: 'log', + errorLogLevel: 'error', skipCallLog: false, skipReturnLog: false, skipErrorLog: false,