pino-test-francisco
v0.0.1
Published
A Pino Transport to ship your logs to railtown.ai
Downloads
4
Maintainers
Readme
pino-railtownai
A Pino v7+ transport to ship your logs to Railtownai
Installation
npm i @railtownai/pino-railtownai
Options
- token: Your railtown token [required]
Usage
import pino from 'pino'
const logger = pino({
transport: {
target: '@railtownai/pino-railtownai',
options: {
token: 'your_token_here'
}
}
})
//or use environment variable 'RAILTOWN_TOKEN' and call it without the token key
const logger = pino({
transport: {
target: '@railtownai/pino-railtownai'
}
})
Manually Logging Errors with additional properties
Import pinoLogger and use as follows:
try {
// code to try
} catch (error) {
pinoLogger.error({
err: error,
userId: '123456789',
projectId: 'abcdefg'
});
}