tslog icon indicating copy to clipboard operation
tslog copied to clipboard

Feature Request: [Log in separate thread]

Open orlandodiaz opened this issue 4 years ago • 1 comments

Description / Use Case for a Feature

It seems this library is adding quite some additional overhead for me, probably because I'm also logging to files. The overhead is noticeable and a problem for low latency applications. This problem would be solved if the logging was done in a separate thread. Does this library support this?

orlandodiaz avatar Dec 10 '21 05:12 orlandodiaz

That sounds quite a lot indeed. Can you give me some more details on your use case? How do you use it?

Btw. version 4.0 is going to be way leaner and pluggable.

terehov avatar Dec 10 '21 07:12 terehov

There is a new next release of version 4. As mentioned before, it is way leaner, more flexible and interacts less with the native V8. You can still put it into a worker thread, if needed. Could you give it a go and see if it helps? I would appreciate your feedback.

  • npm i tslog@next

  • and run it with node --enable-source-maps or for TypeScript node --enable-source-maps --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm

terehov avatar Sep 29 '22 10:09 terehov

V4 is released now, so I'm going to close this issue. Feel free to open a new one if V4 didn't solve it for you.

Here are the docs: tslog.js.org

terehov avatar Nov 15 '22 18:11 terehov