npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pino-seq

v1.2.0

Published

A stream that sends Pino log events to Seq

Downloads

10,083

Readme

pino-seq Build Publish NPM

A stream to send Pino events to Seq. Tested with Node.js versions 4.2.2 and up.

Out-of-process (transport) usage recommended

First, install and use pino in your Node.js app, following the instructions in the Pino documentation.

This will look something like:

const logger = require('pino')();
logger.info('Hello, World!');

Pino will, by default, write newline-delimited JSON events to STDOUT. These events are piped into the pino-seq transport.

First, install pino-seq as a global tool:

npm install -g pino-seq

Then, pipe the output of your Pino-enabled app to it:

node your-app.js | pino-seq --serverUrl http://localhost:5341 --apiKey 1234567890 --property applicationName=PinoSeqExampleApp

pino-seq accepts the following parameters:

  • serverUrl - this is the base URL of your Seq server; if omitted, the default value of http://localhost:5341 will be used
  • apiKey - your Seq API key, if one is required; the default does not send an API key
  • logOtherAs - log other output (not formatted through pino) to seq at this loglevel. Useful to capture messages if the node process crashes or smilar.
  • property - add additional properties to all logs sent to Seq

Capturing other output

To enable capture of output not formatted through pino use the logOtherAs parameter. It's possible to use different settings for STDOUT/STDERR like this, when using bash:

node your-app.js 2> >(pino-seq --logOtherAs Error --serverUrl http://localhost:5341 --apiKey 1234567890) > >(pino-seq --logOtherAs Information --serverUrl http://localhost:5341 --apiKey 1234567890)

In-process (stream) usage

Use the createStream() method to create a Pino stream configuration, passing serverUrl, apiKey and batching parameters.

let pino = require('pino');
let pinoToSeq = require('pino-seq');

let stream = pinoToSeq.createStream({ serverUrl: 'http://localhost:5341' });
let logger = pino({ name: 'pino-seq example' }, stream);

logger.info('Hello Seq, from Pino');

let frLogger = logger.child({ lang: 'fr' });
frLogger.warn('au reviour');

Acknowledgements

Originally by Simi Hartstein and published as simihartstein/pino-seq; maintainership transferred to Datalust at version 0.5.