winstonjs-http-transport
Custom HTTP Transport for winston
NOTE This is experimental code. Do not use in production
Why?
Winston already has a built-in HTTP Transport but it recommends using winstond as a backend which claims to support both HTTP and nssocket
If you already have an API endpoint for logging and looking for a really simple HTTP Transport to directly POST the logs there, you might find this usefull
Usage
// ORconst HTTPTransport =logger
This will POST the logs in the following JSON format
to the endpoint http://your-log-server.com/logs every 1000 ms (only if there are logs in that window)
If you want to use this module, I encourage you to see the code (it's just 27 lines) before and make any required changes as it is currently not optimized enough