Skip to content

Commit

Permalink
added 16, 17, 18 nodejs versions to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kkamkou committed Oct 29, 2021
1 parent 27d6939 commit 20af372
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ node_js:
- "2"
- "3"
- "4"
# - "5" # travis is glitching with this version
- "5" # travis is glitching with this version
- "6"
- "7"
- "8"
Expand All @@ -18,6 +18,9 @@ node_js:
- "13"
- "14"
- "15"
- "16"
- "17"
- "18"
notifications:
slack:
on_success: never
Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ node-gelf - Graylog2 client library for Node.js. Pro - because of code-quality (
"gelf-pro": "~1.3" // see the "releases" section
}
```
```npm install gelf-pro``` (**ALL** node.js versions are supported [0.x to 15.x] :)
```npm install gelf-pro``` (**ALL** node.js versions are supported [0.x to 18.x] :)

## Initialization
```javascript
Expand All @@ -23,6 +23,7 @@ var log = require('gelf-pro');

To provide predictable behaviour, all adapters do **NOT** re-use the socket connection.
There are multiple ([1](https://github.com/kkamkou/node-gelf-pro/pull/68), [2](https://github.com/fdelayen/node-gelf-pro/commit/b52b4b6b1ff26772314b8673dd6fd724c0937caa)) variants available which you can borrow from (and create a new adapter).
[See related section](#third-party-adapters).

- UDP (with deflation and chunking)
- Input: `GELF UDP`
Expand Down Expand Up @@ -69,8 +70,7 @@ log.setConfig({
}
});
```
> `log.setConfig` merges the data. Therefore you can call it multiple times.

> `log.setConfig` merges the data. Therefore, you can call it multiple times.

### Basic functionality
```javascript
Expand Down Expand Up @@ -150,6 +150,15 @@ Default:
Example: `log.emergency(...)`, `log.critical(...)`, etc.
Custom example: `{alert: 0, notice: 1, ...}`

### Third party adapters
You can force using custom adapter by setting the `adapter` right after initialisation. The [signature](lib/adapter/abstract.js) might be found here.
```javascript
var log = require('gelf-pro');
var myFancyAdapter = require('...');
log.adapter = myFancyAdapter;
// (!) adapterName and adapterOptions will be ignored
```

### Aliases

Default: `{log: 'debug', warn: 'warning'}`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gelf-pro",
"version": "1.3.5",
"version": "1.3.6",
"main": "./lib/gelf-pro.js",
"typings": "./typings/index.d.ts",
"author": "Kanstantsin Kamkou <kkamkou@gmail.com>",
Expand Down

0 comments on commit 20af372

Please sign in to comment.