Skip to content

Commit

Permalink
rka-34: move the log (#10)
Browse files Browse the repository at this point in the history
* rka-34: move the log

* rka-34: remove axiom logging

* rka-34: add browser

* rka-34: remove logs

* rka-34: use better stack
  • Loading branch information
konstrybakov authored Jun 23, 2024
1 parent ec9c921 commit a720974
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/api/companies/process/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions app/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare const EdgeRuntime: string | undefined
Binary file modified bun.lockb
Binary file not shown.
9 changes: 3 additions & 6 deletions lib/logger.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverComponentsExternalPackages: ['pino', 'pino-pretty', '@axiomhq/pino']
serverComponentsExternalPackages: ['pino', 'pino-pretty', '@logtail/pino']
}
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a720974

Please sign in to comment.