Standardize logging by replacing console.debug with dynamic log levels in log.ts module

This commit is contained in:
MartinBraquet
2026-04-01 16:53:50 +02:00
parent cc43a8f8af
commit e280b1f5e0

View File

@@ -77,7 +77,7 @@ function writeLog(level: LogLevel, msg: unknown, opts?: {props?: LogDetails; res
// record error properties in GCP if you just do log(err)
output['error'] = msg
}
console.debug(JSON.stringify(output, replacer))
console[level](JSON.stringify(output, replacer))
} else {
const category = Object.values(pick(data, DISPLAY_CATEGORY_KEYS)).join()
const categoryLabel = category ? dim(category) + ' ' : ''