How to use log4js to send logs to elasticsearch?

878 Views Asked by At

I have a node app running as a server and trying to send logs to the remote elasticsearch.

It looks like some syntax has been changed in the recent version of log4js. I tried one example from the link but it errors out. How to log from Node.js with Express to ELK?

How do we configure the elasticsearch in the recent version of log4js v5.2.2?

1

There are 1 best solutions below

0
On

Following the doc worked for me to connect to the elasticsearch

https://github.com/log4js-node/logstashHTTP