Skip to content

Commit

Permalink
Merge branch 'release/v1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmarban committed Jan 7, 2019
2 parents ccbccff + 896ddd1 commit e1b6f4a
Show file tree
Hide file tree
Showing 4 changed files with 612 additions and 298 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ A [Telegram][0] transport for [winston][1].
## Installation

``` sh
$ npm install winston
$ npm install winston-telegram
$ npm install winston@2
$ npm install winston-telegram@1
```

## Usage
Expand Down Expand Up @@ -112,7 +112,7 @@ winston.add(winston.transports.Telegram, {

winston.log('error', 'Redrum. Redrum. Redrum.', { name: 'Danny', surname: 'Torrance' });

//Output: [error] [Redrum. Redrum. Redrum.] [Danny] [Torrance]
// Output: [error] [Redrum. Redrum. Redrum.] [Danny] [Torrance]
```

Using custom format message:
Expand All @@ -138,7 +138,7 @@ winston.add(winston.transports.Telegram, {

winston.warn('Some warning!!');

//Output: [Warning] Some warning!!
// Output: [Warning] Some warning!!
```

Using batching of messages to avoid exceeding rate limits:
Expand Down Expand Up @@ -186,6 +186,10 @@ setTimeout(function() {

## Change history

### v1.3.1 (2019/01/07)
- [#12](https://github.com/ivanmarban/winston-telegram/pull/12) Fix comments ([@is2ei][7])
- Update dependencies

### v1.3.0 (2018/05/03)
- [#10](https://github.com/ivanmarban/winston-telegram/pull/10) Add formatMessage property ([@noveogroup-amorgunov][6])

Expand Down Expand Up @@ -230,4 +234,5 @@ setTimeout(function() {
[3]: https://github.com/alberto467
[4]: https://github.com/JustinOng
[5]: https://github.com/dutu
[6]: https://github.com/noveogroup-amorgunov
[6]: https://github.com/noveogroup-amorgunov
[7]: https://github.com/is2ei
10 changes: 5 additions & 5 deletions lib/winston-telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ Telegram.prototype.name = 'telegram';
* Core logging method exposed to Winston.
* @function log
* @member Telegram
* @param level {string} Level at which to log the message
* @param msg {string} Message to log
* @param meta {Object} **Optional** Additional metadata to attach
* @param callback {function} Continuation to respond to when complete.
* @param {string} level Level at which to log the message
* @param {string} msg Message to log
* @param {Object} meta **Optional** Additional metadata to attach
* @param {function} callback Continuation to respond to when complete.
*/
Telegram.prototype.log = function (level, msg, meta, callback) {
var self = this;
Expand Down Expand Up @@ -103,7 +103,7 @@ Telegram.prototype.log = function (level, msg, meta, callback) {
* Actual method that sends the given message to Telegram
* @function send
* @member Telegram
* @param messageText {string} Formatted text to log
* @param {string} messageText Formatted text to log
*/
Telegram.prototype.send = function (messageText) {
var self = this;
Expand Down
Loading

0 comments on commit e1b6f4a

Please sign in to comment.