3.0.1 • Published 4 years ago

@offirmo/practical-logger-minimal-noop v3.0.1

Weekly downloads
11
License
Unlicense
Repository
github
Last release
4 years ago

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