diff --git a/app/api/companies/process/route.ts b/app/api/companies/process/route.ts index 4e9c112..16ec290 100644 --- a/app/api/companies/process/route.ts +++ b/app/api/companies/process/route.ts @@ -28,9 +28,9 @@ export const GET = async () => { ) } - logger.info('Processing companies and fetching jobs') - try { + logger.info('Processing companies and fetching jobs') + const companies = await querySelectAllCompanies() for (const company of companies) { diff --git a/app/global.d.ts b/app/global.d.ts new file mode 100644 index 0000000..afa7aef --- /dev/null +++ b/app/global.d.ts @@ -0,0 +1 @@ +declare const EdgeRuntime: string | undefined diff --git a/bun.lockb b/bun.lockb index e785d26..907dac7 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/lib/logger.ts b/lib/logger.ts index 65ffcab..befd5e2 100644 --- a/lib/logger.ts +++ b/lib/logger.ts @@ -1,15 +1,12 @@ -import '@axiomhq/pino' +import '@logtail/pino' import { type TransportTargetOptions, pino } from 'pino' const targets: TransportTargetOptions[] = [] if (process.env.NODE_ENV === 'production') { targets.push({ - target: '@axiomhq/pino', - options: { - dataset: process.env.AXIOM_DATASET, - token: process.env.AXIOM_API_TOKEN, - }, + target: '@logtail/pino', + options: { sourceToken: process.env.BETTERSTACK_SOURCE_TOKEN }, }) } else { targets.push({ diff --git a/next.config.mjs b/next.config.mjs index 0c03bb5..4654457 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,7 +1,7 @@ /** @type {import('next').NextConfig} */ const nextConfig = { experimental: { - serverComponentsExternalPackages: ['pino', 'pino-pretty', '@axiomhq/pino'] + serverComponentsExternalPackages: ['pino', 'pino-pretty', '@logtail/pino'] } }; diff --git a/package.json b/package.json index 007411d..07c28a7 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,9 @@ "prepare": "husky" }, "dependencies": { - "@axiomhq/pino": "^1.0.0-rc.4", "@clerk/nextjs": "^5.1.4", "@hookform/resolvers": "^3.4.2", + "@logtail/pino": "^0.4.22", "@neondatabase/serverless": "^0.9.3", "@radix-ui/colors": "^3.0.0", "@radix-ui/react-icons": "^1.3.0",