
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
seneca-pino-adapter
Advanced tools
A Node.js toolkit for Microservice architectures
A log adapter for the Seneca microservice toolkit that enables you to output your logs to Pino. The code in this project follows the Seneca custom logger example.
https://github.com/senecajs/seneca/blob/master/docs/examples/custom-logger.js
I have been working with Seneca for a short period of time and while I found the toolkit very useful though I was very frustrated by the lack of ability to manage and control my log output. I found a few examples that enabled external loggers such as Pino and I am hopeful this adapter along with other Pino add-ons will satisfy my requirements.
Pino claims to be an extremely fast Node.js logger, inspired by Bunyan. View additional details at the following url.
https://github.com/pinojs/pino
$ npm install --save seneca-pino-adapter
This option will allow you complete control over creating a pino logger instance.
// Seneca support.
const Seneca = require('seneca')
// Pino Support.
const Pino = require('pino')
// Load the adapter.
const PinoLogAdapter = require('seneca-pino-adapter')
// Create a pino logger instance.
const logger = Pino({level: 'info'})
// Initialize the Seneca toolkit with the PinoLogAdapter and a Pino instance.
const seneca = Seneca({
internal: {
logger: new PinoLogAdapter({
logger: logger
})
}
})
// Log output via Seneca.
seneca.log.debug('This is a debug log statement!')
seneca.log.info('This is an info log statement!')
seneca.log.error('This is an error log statement!')
seneca.log.warn('This is a warn log statement!')
seneca.log.fatal('This is a fatal log statement!')
// Seneca support.
const Seneca = require('seneca')
// Load the adapter.
const PinoLogAdapter = require('seneca-pino-adapter')
// Create a pino logger instance using configuration.
const config = {level: 'info'}
// Initialize the Seneca toolkit with the PinoLogAdapter and a Pino configuration object.
const seneca = Seneca({
internal: {
logger: new PinoLogAdapter({
config: {
level: 'info'
}
})
}
})
// Log output via Seneca.
seneca.log.debug('This is a debug log statement!')
seneca.log.info('This is an info log statement!')
seneca.log.error('This is an error log statement!')
seneca.log.warn('This is a warn log statement!')
seneca.log.fatal('This is a fatal log statement!')
or
// Initialize the Seneca toolkit with the PinoLogAdapter and a Pino configuration object and a output stream.
const seneca = Seneca({
internal: {
logger: new PinoLogAdapter({
config: {
level: 'info'
},
stream: output_stream
})
}
})
// Log output via Seneca.
seneca.log.debug('This is a debug log statement!')
seneca.log.info('This is an info log statement!')
seneca.log.error('This is an error log statement!')
seneca.log.warn('This is a warn log statement!')
seneca.log.fatal('This is a fatal log statement!')
I tried using the Seneca Pino Logger in an attempt to have Seneca logging that was fast, configurable levels, easy filtering of content at a detailed level, etc. I found that at this time all of the features I needed were not supported so I submitted a pull request. After studying the issues a bit I was inspired to create a new Pino adapter that could be utilized right now. I took a slightly different approach than the original project so I am not sure if my changes are compatible. Possibly if the approach in this project is useful then the code can be merged back at some point. In the mean time I am publishing this project to NPM so it can be easily accessed.
For details on the Seneca plugin go here:
FAQs
A Pino log adapter for the Seneca framework.
We found that seneca-pino-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.