Skip to content
TrademarkTrademark
Docs
Utils

devLogger

Updated: February 22, 2026
View on GitHub

The dev logger is a client-side utility that wraps console methods to only output logs in development mode. This prevents debug messages from appearing in production builds.

Features

  • Only logs in development environment
  • Supports all console methods: log, warn, error, info, debug
  • Drop-in replacement for console methods
  • Zero overhead in production

Basic usage

Import and use like the standard console:

Available methods

All standard console methods are available:

Why use devLogger?

Without devLogger

With devLogger

Benefits

  • Clean production builds: No debug logs in production
  • Better performance: No unnecessary console operations in production
  • Security: Prevents accidental data leaks through console logs
  • Convenience: No need for manual environment checks

API Reference

Type
Default
devLogger.log
(...args: any[]) => void—
devLogger.warn
(...args: any[]) => void—
devLogger.error
(...args: any[]) => void—
devLogger.info
(...args: any[]) => void—
devLogger.debug
(...args: any[]) => void—

Best practices

Use for debugging

Use for development feedback

Don't use for production errors

For errors that should be tracked in production, use regular console.error or an error tracking service:

Edit this page on GitHub