Logger class based on node-bunyan-logger which defaults most commonly used logger settings.

Usage no npm install needed!

<script type="module">
  import samekeBunyanLog from 'https://cdn.skypack.dev/@sameke/bunyan-log';



Simple wrapper around bunyan which sets many common defaults. REQUIRES ECMAScript6 friendly node version


$npm install bunyan-log


var Logger = require('bunyan-log');

var log = new Logger({name: 'myLogger'});
log.debug('hi, my name is ben.');

var log = new Logger([options])
See node-bunyan for options that can be set.

  • logging to stdout: options.useStdOut = true;
  • not logging to file: options.useFile = false;
  • allowing logging to new log file on cluster.fork'd process: options.isNewProcess = true
  • allow process created with child_process.fork to send to parent: options.sendToParent = true
  • default path for logs is [root]/logs directory