Skip to content

Commit

Permalink
rka-34: remove axiom logging
Browse files Browse the repository at this point in the history
  • Loading branch information
konstrybakov committed Jun 16, 2024
1 parent d42734f commit 32866f5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions app/api/companies/process/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export const GET = async () => {
}

try {
console.log('Processing companies and fetching jobs')

logger.info('Processing companies and fetching jobs')

const companies = await querySelectAllCompanies()
Expand Down
Binary file modified bun.lockb
Binary file not shown.
11 changes: 1 addition & 10 deletions lib/logger.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
import '@axiomhq/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,
},
})
} else {
if (process.env.NODE_ENV !== 'production') {
targets.push({
target: 'pino-pretty',
options: {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"prepare": "husky"
},
"dependencies": {
"@axiomhq/pino": "^1.0.0-rc.4",
"@clerk/nextjs": "^5.1.4",
"@hookform/resolvers": "^3.4.2",
"@neondatabase/serverless": "^0.9.3",
Expand Down

0 comments on commit 32866f5

Please sign in to comment.