Correct transports
This commit is contained in:
+2
-5
@@ -6,20 +6,17 @@ import {consoleTransport} from '#/logger/transports/console'
|
||||
import {sentryTransport} from '#/logger/transports/sentry'
|
||||
import {LogContext, LogLevel, Metadata, Transport} from '#/logger/types'
|
||||
import {enabledLogLevels} from '#/logger/util'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
|
||||
const TRANSPORTS: Transport[] = (function configureTransports() {
|
||||
switch (process.env.NODE_ENV) {
|
||||
case 'production': {
|
||||
return [isWeb && sentryTransport, bitdriftTransport].filter(
|
||||
Boolean,
|
||||
) as Transport[]
|
||||
return [sentryTransport, bitdriftTransport].filter(Boolean) as Transport[]
|
||||
}
|
||||
case 'test': {
|
||||
return []
|
||||
}
|
||||
default: {
|
||||
return [consoleTransport, bitdriftTransport]
|
||||
return [consoleTransport]
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user