Demo
General

Observability

Monitor your application's performance and track errors with Sentry and Vercel Analytics.

The Pro Next.js Drizzle starter kit comes with a complete observability stack to ensure your application runs smoothly in production.

Structured Logging

The kit includes a high-performance logging system based on Pino.

Usage

Use the logger to record events with structured metadata.

lib/actions/billing.ts
import { logger } from '@/lib/logger';

logger.info({ userId, amount }, 'Payment processed successfully');

Log Levels

You can control the verbosity of logs via the NEXT_PUBLIC_LOG_LEVEL environment variable.

.env
NEXT_PUBLIC_LOG_LEVEL="debug" # trace, debug, info, warn, error, fatal

Available log levels (from most to least verbose):

  • trace - Very detailed debugging information
  • debug - Debug information
  • info - General informational messages (default)
  • warn - Warning messages
  • error - Error messages
  • fatal - Critical errors