https://github.com/superpaintman/winston-seq
A Seq transport for Winston
https://github.com/superpaintman/winston-seq
logger seq winston winston-transport
Last synced: about 2 months ago
JSON representation
A Seq transport for Winston
- Host: GitHub
- URL: https://github.com/superpaintman/winston-seq
- Owner: SuperPaintman
- License: mit
- Created: 2017-07-09T12:34:32.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-03T03:23:14.000Z (over 3 years ago)
- Last Synced: 2025-04-12T02:36:48.824Z (about 2 months ago)
- Topics: logger, seq, winston, winston-transport
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/winston-seq
- Size: 51.8 KB
- Stars: 7
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# winston-seq
[![Linux Build][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Commitizen friendly][commitizen-image]][commitizen-url]
[![NPM version][npm-v-image]][npm-url]
[![NPM Downloads][npm-dm-image]][npm-url]--------------------------------------------------------------------------------
## Installation
```sh
$ npm install --save winston-seq
# Or with yarn
$ yarn add winston-seq
```--------------------------------------------------------------------------------
## Usage
```ts
'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
```ts
'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:
```ts
// ...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
```sh
$ npm install
$ # or
$ yarn
$
$ npm run build
```--------------------------------------------------------------------------------
## Test
```sh
$ npm run test
```--------------------------------------------------------------------------------
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b feature/`)
3. Commit your changes (`git commit -am '(): added some feature'`)
4. Push to the branch (`git push origin feature/`)
5. Create a new Pull Request--------------------------------------------------------------------------------
## Contributors
- [SuperPaintman](https://github.com/SuperPaintman) SuperPaintman - creator, maintainer
--------------------------------------------------------------------------------
## Changelog
[Changelog][changelog-url]--------------------------------------------------------------------------------
## License
[MIT][license-url]
[license-url]: https://raw.githubusercontent.com/SuperPaintman/winston-seq/master/LICENSE
[changelog-url]: https://raw.githubusercontent.com/SuperPaintman/winston-seq/master/CHANGELOG.md
[npm-url]: https://www.npmjs.com/package/winston-seq
[npm-v-image]: https://img.shields.io/npm/v/winston-seq.svg
[npm-dm-image]: https://img.shields.io/npm/dm/winston-seq.svg
[travis-image]: https://img.shields.io/travis/SuperPaintman/winston-seq/master.svg?label=linux
[travis-url]: https://travis-ci.org/SuperPaintman/winston-seq
[coveralls-image]: https://img.shields.io/coveralls/SuperPaintman/winston-seq/master.svg
[coveralls-url]: https://coveralls.io/r/SuperPaintman/winston-seq?branch=master
[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
[commitizen-url]: https://commitizen.github.io/cz-cli/