Skip to content

Commit

Permalink
rka-34: use pino-axiom
Browse files Browse the repository at this point in the history
  • Loading branch information
konstrybakov committed Jun 15, 2024
1 parent 9d8dd9f commit 991e47b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
7 changes: 5 additions & 2 deletions lib/logger.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import '@axiomhq/pino'
import 'pino-axiom'
import { type TransportTargetOptions, pino } from 'pino'

const targets: TransportTargetOptions[] = []

console.log('logger env', process.env.NODE_ENV)

if (process.env.NODE_ENV === 'production') {
targets.push({
target: '@axiomhq/pino',
target: 'pino-axiom',
options: {
orgId: process.env.AXIOM_ORG,
dataset: process.env.AXIOM_DATASET,
token: process.env.AXIOM_API_TOKEN,
},
Expand Down
2 changes: 1 addition & 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 All @@ -29,6 +28,7 @@
"next": "14.2.3",
"normalize-url": "^8.0.1",
"pino": "^9.1.0",
"pino-axiom": "^1.0.178",
"pino-pretty": "^11.1.0",
"react": "^18",
"react-dom": "^18",
Expand Down

0 comments on commit 991e47b

Please sign in to comment.