winston-seq-updated
v1.0.4
Published
Like winston-seq, but updated. Temporary package
Downloads
38,816
Maintainers
Readme
winston-seq
Like winston-seq but supports https
Installation
$ npm install --save winston-seq
# Or with yarn
$ yarn add winston-seq
Usage
'use strict';
import { Logger } from 'winston';
import { Seq } from 'winston-seq';
const logger = new Logger({
transports: [
new Seq({
serverUrl: 'http://127.0.0.1:5341'
/* apiKey: '7fs2V60izlkgau2ansjH' */
})
]
});
or
'use strict';
var winston = require('winston');
/**
* Requiring `winston-seq` will expose
* `winston.transports.Seq`
*/
require('winston-seq');
winston.add(winston.transports.Seq, {
serverUrl: 'http://127.0.0.1:5341'
/* apiKey: '7fs2V60izlkgau2ansjH' */
});
Use non-standard levels? Overwrite the mapper:
// ...
const logger = new Logger({
transports: [
new Seq({
levelMapper(level = '') {
switch (level.toLowerCase()) {
/** Winston Level -> Seq Level */
case 'error': return 'Error';
case 'warn': return 'Warning';
case 'info': return 'Information';
case 'debug': return 'Debug';
case 'verbose': return 'Verbose';
case 'silly': return 'Verbose';
case 'fatal': return 'Fatal';
default: return 'Information';
}
}
})
]
});
// ...
Build
$ npm install
$ # or
$ yarn
$
$ npm run build
Test
$ npm run test
Contributing
- Fork it (https://github.com/SuperPaintman/winston-seq/fork)
- Create your feature branch (
git checkout -b feature/<feature_name>
) - Commit your changes (
git commit -am '<type>(<scope>): added some feature'
) - Push to the branch (
git push origin feature/<feature_name>
) - Create a new Pull Request
Contributors
- SuperPaintman SuperPaintman - creator, maintainer