MOON
Server: Apache
System: Linux e2e-78-16.ssdcloudindia.net 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
User: imensosw (1005)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/imensosw/chartapi.imenso.co/node_modules/consola/src/node.js
import env from 'std-env'
import { Consola, BasicReporter, FancyReporter, JSONReporter, WinstonReporter, LogLevel } from '.'

function createConsola () {
  // Log level
  let level = env.debug ? 4 : 3
  if (process.env.CONSOLA_LEVEL) {
    level = parseInt(process.env.CONSOLA_LEVEL) || level
  }

  // Create new consola instance
  const consola = new Consola({
    level,
    reporters: [
      (env.ci || env.test)
        ? new BasicReporter()
        : new FancyReporter()
    ]
  })

  // Expose constructors
  consola.Consola = Consola
  consola.BasicReporter = BasicReporter
  consola.FancyReporter = FancyReporter
  consola.JSONReporter = JSONReporter
  consola.WinstonReporter = WinstonReporter
  consola.LogLevel = LogLevel

  return consola
}

if (!global.consola) {
  global.consola = createConsola()
}

export default global.consola