1.0.0 • Published 5 years ago

winston-sms v1.0.0

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

winston-sms

Sending sms on important log event easily.

You will need nomado account to use the transport. Register now and get free test credit.

Install

$ npm install --save winston-sms

or

$ yarn add winston-sms

Quickstart

let winston = require('winston')
let winstonSms = require('winston-sms')

var logger = winston.CreateLogger({
     //Your custom configurations
     // refer to https://github.com/winstonjs/winston#creating-your-own-logger
     transports: [
       new winstonSms({
         username: 'your_nomado_username',
         password: 'your_nomado_password',
         to: [3725343433, 3228887000]
       })
     ]
})

Options

optionsdescriptionrequireddefault
usernamestring nomado usernameYES
passwordstring nomado account passwordYES
fromnumeric e164 format number. eg: 3228887000NONOMADO
tonumeric array e164 formatted valid mobile numbersYES
unicodeboolean If you have non-english characters in sms, set it to trueNOfalse
levelstring winston levelNOinfo

Todo

  • Continouos Integration
  • Enhance documentation

Please feel free to send pull requests on develop branch.

Contributors