2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search 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.
  • Only logs in development environment
  • Supports all console methods: log, warn, error, info, debug
  • Drop-in replacement for console methods
  • Zero overhead in production
Import and use like the standard console: All standard console methods are available:
  • 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
Prop
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
For errors that should be tracked in production, use regular console.error or an error tracking service:
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club