#
Baselime Pino Transport
Send structured logs to Baselime with pino and the @baselime/pino-transport
.
Don't use this with Vercel, use the native Log Drain Integration instead.
Step 1: Install the Transport
npm i @baselime/pino-transport
Step 2: Set up the Pino Logger with the Baselime Transport
Get your public BASELIME_API_KEY
from the Baselime Console
import pino from 'pino';
const transport = pino.transport({
target: "@baselime/pino-transport",
options: { baselimeApiKey: 'BASELIME_API_KEY' }
});
const logger = pino(transport);
Step 3: Use the logger
logger.error("I will display in the Baselime Error Page");
logger.info({
pino: "AWESOME",
baselime: "AWESOME",
logging: "AWESOME"
}, "Logging with Pino and Baselime is AWESOME");
#
Configuration
The @baselime/pino-transport
takes the following options