How to use the @adonisjs/logger/build/standalone.Logger function in @adonisjs/logger

To help you get started, we’ve selected a few @adonisjs/logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adonisjs / adonis-framework / test / cors.spec.ts View on Github external
const server = createServer(async (req, res) => {
        const cors = new Cors(fixture.configureOptions())
        const logger = new Logger({ name: 'adonis', enabled: false, level: 'trace' })

        fixture.configureRequest(req)
        const ctx = HttpContext.create('/', {}, logger, new Profiler({}).create(''), encryption, req, res)
        await cors.handle(ctx)

        if (!ctx.response.hasLazyBody) {
          ctx.response.send(null)
        }

        ctx.response.finish()
      })

@adonisjs/logger

Logger built on top of pino to be used by AdonisJs

MIT
Latest version published 19 hours ago

Package Health Score

71 / 100
Full package analysis