Skip to content

Commit

Permalink
feat: kunna setja loggnivå med LOG_LEVEL
Browse files Browse the repository at this point in the history
  • Loading branch information
adalinesimonian committed Feb 19, 2025
1 parent 104fed9 commit d6f083c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ Options:
// Get log level from command parameters or environment variable
let minLogLevel = process.argv.includes('--log-level')
? process.argv[process.argv.indexOf('--log-level') + 1]
: process.env.NODE_ENV === 'production'
? 'warn'
: 'verbose';
: process.env.LOG_LEVEL ||
(process.env.NODE_ENV === 'production' ? 'warn' : 'verbose');

// Validate and normalize the log level
if (!logLevels.includes(minLogLevel as LogLevel)) {
Expand Down

0 comments on commit d6f083c

Please sign in to comment.