Hi,
I have just read documentation about Asynchronous Logging. I see that it's great for improving performance. I'm working with pino-elasticsearch so I wonder how can I config async with pino-elasticsearch. I try to put instace of pino-elasticsearch into dest like this:
const logger = Pino(
{ level: "info" },
Pino.destination({
dest: streamToElastic,
minLength: 4096,
sync: false
})
);
but It doesn't work.
Thanks for any helps
streaming to ES is already asynchronous by nature. There is no need to use pino.destination().
cc @delvedor
Yeah, using pino-elasticsearch there should work!
@mcollina the latest version of the client offers a bulk indexer that works with streams, I'll work on a pr for using it, it should improve the performances and the memory consumption ;)
Most helpful comment
Yeah, using
pino-elasticsearchthere should work!@mcollina the latest version of the client offers a bulk indexer that works with streams, I'll work on a pr for using it, it should improve the performances and the memory consumption ;)