Doug Docs

Logger Overview

@caffeinebounce/logger is the shared logging layer for auth events, client instrumentation, and form-oriented error reporting.

Install

yarn add @caffeinebounce/logger

Entrypoints

Root

@caffeinebounce/logger

View source

Notable exports

ApiErrorCodeApiHandlerErrorLoggingContextApiErrorContextApiErrorResponseAuthLogContextLogContextLogLevelBetterStackLoggeruseLoggeradminLoggersanitizeErrorMessageForClient

Build targets

  • ./dist/index.d.ts
  • ./dist/index.js
  • ./dist/index.mjs

Client

@caffeinebounce/logger/client

View source

Client-safe exports from @caffeinebounce/logger This module provides client-safe versions of logger utilities that use dynamic imports to avoid the @logtail/next dynamic require() issue with Turbopack. Import from "@caffeinebounce/logger/client" in client components instead of "@caffeinebounce/logger" to avoid build errors.

Notable exports

ApiErrorCodeApiHandlerErrorLoggingContextApiErrorContextApiErrorResponseFormErrorContextFormErrorTypeAuthLogContextLogContextLogLevelauthLoggerClientErrorLogContext

Build targets

  • ./dist/client.d.ts
  • ./dist/client.js
  • ./dist/client.mjs

Notes

  • The root export is appropriate for shared logging utilities.
  • The /client subpath is the safest import boundary for browser-only logging helpers.

On this page