pinojs / pino-elasticsearch

🌲 load pino logs into Elasticsearch
MIT License
179 stars 67 forks source link

feat: enable to read config file #71

Closed henry039 closed 3 years ago

henry039 commented 3 years ago

enable CLI to read config file

Usage:

node ./index.js | tee -a ./pino_log/http.log | jq -c 'del(.req.headers) | del(.http.response.headers) | del(.redact)' | pino-elasticsearch -r config.json

henry039 commented 3 years ago

I am not sure how to add unit test for cli.js Try to using const { spawn } = require('child_process'); but fail to mock lib module

mcollina commented 3 years ago

Why would you need to mock lib?

mcollina commented 3 years ago

don't worry about the tests, there are none for the CLI

mcollina commented 3 years ago

Waiting for @delvedor (who works for Elastic)