tslog icon indicating copy to clipboard operation
tslog copied to clipboard

Feature Request: can we use asynchronous transporters?

Open jeanhdev opened this issue 1 year ago • 2 comments

I'm using Axiom and would love to know if it's possible to use tslog with an asynchronous Transporter.

In winston - it's not possible somehow, very weird.

jeanhdev avatar Apr 06 '23 09:04 jeanhdev

I am not familiar with Axiom and don't quite understand the use case. Can you please provide some more context and ideally an example how you would like to use it? But I believe from what I understand it should be possible already.

terehov avatar Apr 12 '23 12:04 terehov

I imagine there's no async as you don't want your system to wait for logging so instead you'd use streaming

here's a tslog example https://tslog.js.org/#/?id=storing-logs-in-a-file-system-with-rotating-files and axioms API also accepts streaming data, here's an example on how to ingest a raw buffer into axiom, here you can see that you should be able to pass in a readable stream to ingestRaw and maybe the winston implementation for axiom can help

CanRau avatar Oct 24 '23 22:10 CanRau