A pino 'transport' for writing to a websocket

Usage no npm install needed!

<script type="module">
  import abeaiPinoWebsocket from 'https://cdn.skypack.dev/@abeai/pino-websocket';



This module provides a "transport" for [pino][pino] that simply forwards messages to a websocket socket server. The module can echo the received logs or work silently.

You should install pino-websocket globally for ease of use:

$ npm install -g @abeai/pino-websocket


Given an application foo that logs via [pino][pino], and a webscoket server that collects logs on port 5000 on IP, you would use pino-websocket like so:

$ node foo | pino-websocket -a -p 5000