Skip to content
Grant Carthew edited this page Oct 25, 2024 · 7 revisions

log Object

To use the perj package to log JSON messages you need to create a logger object. The term log is used throughout this wiki to reference the logger objects used in the examples.

You create a logger object from the perj object:

import Perj from 'perj'
const log = new Perj()

In the above example the log variable is holding a reference to the logger object.

Use the Wiki sidebar menu on the right to learn more about the log API. 👉