mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-04 23:03:45 -04:00
Standardize logging by replacing console.debug with dynamic log levels in log.ts module
This commit is contained in:
@@ -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) + ' ' : ''
|
||||
|
||||
Reference in New Issue
Block a user