-
Notifications
You must be signed in to change notification settings - Fork 1
Transports
Grant Carthew edited this page May 30, 2018
·
2 revisions
The perj
logger does not have transports like other major logging packages. This is by design so that log storage can occur outside of the application process. The correct way to use perj
and store the JSON log entries is to pipe the standard output of your Node.js application process through to the standard input of a transport package.
node app.js | node transport.js
See the examples with stdin
in the file name. These examples are custom transports you can use by piping your application stdin
into the example file.
You could also use some of the pino transport packages for inspiration.