function logger(opts = {}) {
    const { level = 'trace', overrideConsole = false, options } = opts;
    DetoxLogger = require('./DetoxLogger');

    const instance = new DetoxLogger({
      file: jsonlLogPath,
      userConfig: {
        level,
        overrideConsole,
        options: {
          ...DetoxLogger.defaultOptions({ level }),
          colors: false,
          // @ts-ignore
          out: fs.createWriteStream(plainLogPath),
          ...options,
        },
      },
    });

    _loggerInstances = _loggerInstances || [];
    _loggerInstances.push(instance);
    return instance;
  }
@param {{
  level?: Detox.DetoxLogLevel;
  overrideConsole?: boolean;
  options?: import('bunyan-debug-stream').BunyanDebugStreamOptions;
}} [opts]
@returns {import('./DetoxLogger')}