This library is designed for use with @golem-sdk/golem-js
based libraries and applications. While @golem-sdk/golem-js
provides built in logging capabilities, you can use @golem-sdk/pino-logger
as an extension to your workflow to
This library exposes two implementations of the Logger
interface from @golem-sdk/golem-js
:
- JSON output logging (
pino
) - Pretty formatted logging (
pino-pretty
) - Support for forcing certain log level by setting
GOLEM_PINO_LOG_LEVEL="debug"
- usefully when you want to control the logging done by this library without changing the application using it.
@golem-sdk/pino-logger
is available as a NPM package. You can install it with:
npm install @golem-sdk/pino-logger
In your @golem-sdk/golem-js
based application, you can use in all the places where the Logger
instance is accepted:
import { pinoPrettyLogger } from "@golem-sdk/pino-logger";
const logger = pinoPrettyLogger({
level: "debug",
});
The library is developed using TypeScript and can be built with:
npm run build