winston-restify
Another transport to sending logs with winston. Inspired by winston-endpoint
Installation:
npm install winston-restify --save
Note:
Requires Node >8.0.0
.
API Options:
Key | Description |
---|---|
level | logging-levels |
silent | setting to true will turn the console transport off (default: false) |
dispatch | setting to false will disable log shipping (default: true) |
client | api-options |
basicAuth | description |
debug | print responses status |
prepend | sends the level and message to request (default: { level: true, message: true }) |
Meta Options:
Key | Description |
---|---|
method | HTTP method (default: post) |
options | description |
path | endpoint api (default: '/') |
data | object for sending, supported in POST methods, PUT (default: {}) |
Example:
This example is available here as well.
'use strict' const restify = const winston = const winstonRestify = winston // HTTP transport included to winston // remove transport from the logger to terminal const server = restify server server server
Tests
npm test
License
Copyright (c) 2018-present