https://github.com/gmoqa/winston-transport-mattermost
A Winston 3+ transport for Mattermost.
https://github.com/gmoqa/winston-transport-mattermost
logger mattermost nodejs transport winston
Last synced: 7 months ago
JSON representation
A Winston 3+ transport for Mattermost.
- Host: GitHub
- URL: https://github.com/gmoqa/winston-transport-mattermost
- Owner: gmoqa
- License: mit
- Created: 2019-08-07T20:14:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-20T03:32:36.000Z (about 3 years ago)
- Last Synced: 2025-03-29T14:36:48.113Z (7 months ago)
- Topics: logger, mattermost, nodejs, transport, winston
- Language: JavaScript
- Homepage: https://github.com/gmoqa/winston-transport-mattermost
- Size: 30.3 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# winston-transport-mattermost
> A Winston @3.x transport for [Mattermost](https://mattermost.com/).
[](https://nodei.co/npm/winston-transport-mattermost/)
## Install
```bash
npm install winston-transport-mattermost
```
## Usage
```js
const winston = require('winston')
const MattermostTransport = require('winston-transport-mattermost')
const logger = winston.createLogger({
transports: [
new MattermostTransport({
level: 'error',
webhook_url: 'https://your.mattermost.com/hooks/334ktjodu7gq5yq7afj3w',
username: 'logger name',
icon_url: 'https://example.com/icon.png'
})
]
})
logger.error('Something happened!')
```
## Config
* __webhook_url:__ (Required) Mattermost Incoming Webhook URL.
* __username:__ (Default **Winston**) Who sends the message.
* __icon_url:__ (Default **Adorable avatars**) Public image URL for user avatar.
## Screenshots

## Motivation
The other mattermost transport packages have too many dependencies and are not compatible with Winston @3.X, and don't allow to customize the name or avatar of the message.
## License
[MIT](./LICENSE)