@offirmo/practical-logger-minimal-noop

Implementation of Offirmo’s practical logger doing nothing at all

Usage no npm install needed!

<script type="module">
  import offirmoPracticalLoggerMinimalNoop from 'https://cdn.skypack.dev/@offirmo/practical-logger-minimal-noop';
</script>

README

Offirmo’s practical logger - no op implementation
Offirmo’s quality seal

npm badge dependencies badge bundle size badge license badge maintenance status badge

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