0.0.3 • Published 5 years ago

winston-azure-functions v0.0.3

Weekly downloads
623
License
MIT
Repository
github
Last release
5 years ago

winston-azure-functions

Build Status Dependencies

How to use

Setup

Install it:

npm install winston-azure-functions --save
yarn add winston-azure-functions

Usage

import { AzureFunctions } from 'winston-azure-functions'
import winston = require('winston')
module.exports = (context) => {
  winston.configure({
    transports: [
      new AzureFunctions({ context })
    ]
  })
  winston.info('Initializing function')
  context.done()
}

Supported log levels

Log levelDescription
errorWrites to error level logging, or lower.
warnWrites to warning level logging, or lower.
infoWrites to info level logging, or lower.
verboseWrites to verbose level logging.