Comparing version 2.7.0 to 2.7.1
{ | ||
"name": "pino", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "fast and simple logger", | ||
@@ -5,0 +5,0 @@ "main": "pino.js", |
@@ -731,2 +731,23 @@ # pino [![Build Status](https://travis-ci.org/mcollina/pino.svg)](https://travis-ci.org/mcollina/pino) [![Coverage Status](https://coveralls.io/repos/github/mcollina/pino/badge.svg?branch=master)](https://coveralls.io/github/mcollina/pino?branch=master) | ||
<a name="pino-elasticsearch"></a> | ||
### pino-elasticsearch | ||
[pino-elasticsearch][pino-elasticsearch] uploads the log lines in bulk | ||
to [ElasticSearch][elasticsearch], to be displayed in [Kibana][kibana]. | ||
It is extremely simple to use and setup | ||
```sh | ||
$ node yourapp.js | pino-elasticsearch --host 192.168.1.42 | ||
``` | ||
Assuming ElasticSearch is running on 192.168.1.42. | ||
Then, head to your | ||
Kibana instance, and create an index pattern | ||
(https://www.elastic.co/guide/en/kibana/current/setup.html) on `'pino'`, | ||
the default for `pino-elasticsearch`. | ||
[pino-elasticsearch]: https://github.com/mcollina/pino-elasticsearch | ||
<a name="pino-socket"></a> | ||
@@ -750,2 +771,40 @@ ### pino-socket | ||
#### Logstash | ||
You can also use [pino-socket][pino-socket] to upload logs to | ||
[LogStash][logstash] via: | ||
``` | ||
$ node yourapp.js | pino-socket -a 127.0.0.1 -p 5000 -m tcp | ||
``` | ||
Assuming your logstash is running on the same host and configured as | ||
follows: | ||
``` | ||
input { | ||
tcp { | ||
port => 5000 | ||
} | ||
} | ||
filter { | ||
json { | ||
source => "message" | ||
} | ||
} | ||
output { | ||
elasticsearch { | ||
hosts => "127.0.0.1:9200" | ||
} | ||
} | ||
``` | ||
See https://www.elastic.co/guide/en/kibana/current/setup.html to learn | ||
how to setup [Kibana][kibana]. | ||
If you are a Docker fan, you can use | ||
https://github.com/deviantony/docker-elk to setup an ELK stack. | ||
[pino-socket]: https://www.npmjs.com/package/pino-socket | ||
@@ -834,1 +893,4 @@ | ||
Licensed under [MIT](./LICENSE). | ||
[elasticsearch]: https://www.elastic.co/products/elasticsearch | ||
[kibana]: https://www.elastic.co/products/kibana |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
482507
894