How to use the modern-logger.configure function in modern-logger

To help you get started, we’ve selected a few modern-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 hfreire / browser-as-a-service / src / app.js View on Github external
#!/usr/bin/env node

/*
 * Copyright (c) 2018, Hugo Freire .
 *
 * This source code is licensed under the license found in the
 * LICENSE.md file in the root directory of this source tree.
 */

const VERSION = process.env.VERSION
const VERSION_COMMIT = process.env.VERSION_COMMIT
const VERSION_BUILD_DATE = process.env.VERSION_BUILD_DATE

const Logger = require('modern-logger')
Logger.configure({
  transports: {
    console: [
      {
        colorize: false,
        timestamp: false
      }
    ]
  }
})

if (VERSION && VERSION_COMMIT && VERSION_BUILD_DATE) {
  Logger.info(`Running version ${VERSION} from commit ${VERSION_COMMIT} built on ${VERSION_BUILD_DATE}`)
}

const Server = require('./server')

modern-logger

A modern logger built on top of Winston with native support for emojis and Rollbar

MIT
Latest version published 3 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages