Skip to content

Commit 0c8df7d

Browse files
committed
refactor(logger): simplify color handling in appLogger function
1 parent d8d1d38 commit 0c8df7d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/utils/logger.utils.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,11 @@ export enum ConsolaLogLevel {
1111
Verbose = 999
1212
}
1313

14-
// Verificar se está rodando como binário compilado
15-
const isPackaged = process.argv[0].includes('gql-federation-schema-parser')
16-
1714
export function appLogger(logLevel = ConsolaLogLevel.Info, useColors?: boolean) {
18-
const shouldUseColors = useColors !== undefined ? useColors : !isPackaged
19-
2015
return createConsola({
2116
level: logLevel,
22-
23-
// fancy: isPackaged ? false : shouldUseColors,
2417
formatOptions: {
25-
colors: shouldUseColors,
18+
colors: useColors,
2619
columns: process.stdout.columns || 80
2720
}
2821
})

0 commit comments

Comments
 (0)