@offirmo/practical-logger-minimal-noop
v3.0.1
Published
Implementation of Offirmo’s practical logger doing nothing at all
Downloads
23
Readme
This is a minimal, no-operation implementation of Offirmo’s practical logger.
Use this lib if you want to provide a default implementation, for example as a default value in a dependency injection mechanism, ready to be replaced by an actual version if the caller wants it, but not hurting the bundle size if the user opts out.
API
Exact same API as @offirmo/practical-logger-browser
and @offirmo/practical-logger-node
:
import { createLogger } from '@offirmo/practical-logger-minimal-noop'
const logger = createLogger()
logger.log('hello from logger!') // absolutely nothing happens, no-op