feat: disable logger on testing
This commit is contained in:
parent
3535b97cfa
commit
dc97053d04
@ -23,6 +23,7 @@ export const startup = async () => {
|
|||||||
'CLERK_WEBHOOK_SECRET',
|
'CLERK_WEBHOOK_SECRET',
|
||||||
'CLERK_SECRET_KEY',
|
'CLERK_SECRET_KEY',
|
||||||
'CLERK_PUBLISHABLE_KEY',
|
'CLERK_PUBLISHABLE_KEY',
|
||||||
|
'BETTERSTACK_LOG_TOKEN',
|
||||||
]
|
]
|
||||||
keys.map((key) => {
|
keys.map((key) => {
|
||||||
if (!import.meta.env[key]) {
|
if (!import.meta.env[key]) {
|
||||||
|
@ -1 +1 @@
|
|||||||
{"root":["./src/main.tsx","./src/routeTree.gen.ts","./src/vite-env.d.ts","./src/components/Layout.tsx","./src/components/Navigation.tsx","./src/components/NavigationMobile.tsx","./src/routes/__root.tsx","./src/routes/about.lazy.tsx","./src/routes/index.lazy.tsx"],"version":"5.6.2"}
|
{"root":["./src/main.tsx","./src/routeTree.gen.ts","./src/vite-env.d.ts","./src/components/Layout.tsx","./src/components/Navigation.tsx","./src/components/NavigationMobile.tsx","./src/routes/__root.tsx","./src/routes/index.lazy.tsx","./src/routes/changelog/index.lazy.tsx","./src/routes/user/index.lazy.tsx","./src/utils/navigation-routes.ts"],"version":"5.6.2"}
|
@ -7,5 +7,9 @@ const logtail = new Logtail(process.env.BETTERSTACK_LOG_TOKEN as string)
|
|||||||
|
|
||||||
// Create a Winston logger - passing in the Logtail transport
|
// Create a Winston logger - passing in the Logtail transport
|
||||||
export const logger = winston.createLogger({
|
export const logger = winston.createLogger({
|
||||||
transports: [new LogtailTransport(logtail)],
|
transports: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (import.meta.env.NODE_ENV !== 'test') {
|
||||||
|
logger.add(new LogtailTransport(logtail))
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user