Search code examples
javascriptnode.jslog4js-node

log4js https logging endpoint


In log4js is there any option to use HTTP endpoint for logging the information. Like in Winston you have HTTP transport for logging to remote HTTP endpoint by specifying host:port, is there something similar in log4js ?


Solution

  • HTTP is broad, is there a specific logging protocol you are interested in?

    There is GELF appender you could use, it is based on UDP though.

    If you are looking for something simple as just sending POST requests to a private HTTP server, then that can actually be implemented without many difficulties. Just take console appender for an example, and change the console.log to HTTP Post function.