function Logger(options, extra) {
  if (!(this instanceof Logger)) {
    return new Logger(options, extra)
  }

  Readable.call(this)
  const passedInLevel = this.coerce(options.level)
  this.options = {
    _level: passedInLevel,
    enabled: options.enabled === undefined ? true : options.enabled,
    configured: options.configured === undefined ? true : !!options.configured
  }
  this._nestedLog = false
  this.name = options.name
  this.hostname = options.hostname || os.hostname()
  this.extra = extra || Object.create(null)
  this.buffer = ''
  this.reading = false
  this.logQueue = []
  if (options.stream) {
    this.pipe(options.stream)
  }
}
A logging utility with methods `info`, `warn`, `error`, `fatal`, `debug`,
and `trace`. This logger is very similar to Pino.

Each method supports the following invocation signatures:

@example
// Logs a single string.
logger.info('hello world')

@example
// Logs an interpolated string.
logger.info('hello %s', 'world')

@example
// Logs with data properties inlined:
logger.info({a: 1, b: 2}, 'logged data')
// e.g. `{ a: 1, b: 2, msg: 'logged data', level: 30 }`

@example
// Recommended for keeping data usable:
logger.info({ data: { the: 'data', that: 'is important' }}, 'some message')
// ^ only the `data` key will be inlined at the top level. The sub-properties
// will still be nested under the data key.

@type {Object}