Skip to content

How can I get detailed stack trace and error logs in bun? #17344

Answered by opuu
opuu asked this question in Q&A
Discussion options

You must be logged in to vote

Enabling logger shows the queries, but still not enough information about the error:

import { SQL } from 'bun'
import { drizzle } from 'drizzle-orm/bun-sql'
import * as schema from '@/db/schemas'
import env from '@/env'

const client = new SQL(env.DB_STRING)

export const db = drizzle(client, {
	schema,
	logger: env.APP_ENV === 'local',
})

export type DB = typeof db

export default db

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by opuu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant