src/node.js
function Log (name, opts) {
  if (!(this instanceof Log)) return new Log(name, opts)
  Object.assign(options,
    inspectOpts(process.env),
    inspectNamespaces(process.env)
  )
  LogBase.call(this, name, Object.assign({}, options, opts))
  const colorFn = (n) => chalk.hex(n)
  this.color = selectColor(name, colorFn)
  this.levColors = levelColors(colorFn)
  if (!this.opts.json) {
    this._log = this._logOneLine
  }
}
function Log (name, opts) {
  if (!(this instanceof Log)) return new Log(name, opts)
  Object.assign(options,
    inspectOpts(process.env),
    inspectNamespaces(process.env)
  )
  LogBase.call(this, name, Object.assign({}, options, opts))
  const colorFn = (n) => chalk.hex(n)
  this.color = selectColor(name, colorFn)
  this.levColors = levelColors(colorFn)
  if (!this.opts.json) {
    this._log = this._logOneLine
  }
}
function Log ( name , opts ) { if ( ! ( this instanceof Log ) ) return new Log ( name , opts ) Object . assign ( options , inspectOpts ( process . env ) , inspectNamespaces ( process . env ) ) LogBase . call ( this , name , Object . assign ( { } , options , opts ) ) const colorFn = ( n ) => chalk . hex ( n ) this . color = selectColor ( name , colorFn ) this . levColors = levelColors ( colorFn ) if ( ! this . opts . json ) { this . _log = this . _logOneLine } }
creates a new logger
@constructor
@param {String} name - namespace of Logger
creates a new logger