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 🙏

© 2025 – Pkg Stats / Ryan Hefner

pino-arborsculpture

v3.0.0

Published

Allows changing Pino log levels at runtime via a file monitor

Readme

pino-arborsculpture

Lead maintainer: jsumners

pino-arborsculpture is a module that allows you to change the logging level of a Pino logger, or set of loggers (e.g. child loggers) while your process is running. It accomplishes this by monitoring a specified file for changes and acts accordingly.

Example

'use strict'

const Arborsculpt = require('pino-arborsculpture')
const pino = require('pino')
const log = pino() // info level by default

const arbor = new Arborsculpt({
  path: '/tmp/adjustments.json',
  loggers: [log],
  interval: 60_000 // the default
})

arbor.on('error', function (err) {
  // there was a problem reading the file or setting the level
})

At some point you decide log should be set to the debug level because production is broken, and you have to figure out why without taking it offline, so you create the /tmp/adjustments.json file:

{
  "level": "debug"
}

Within one minute of creating the file, your process will start outputting debug level log lines.

Options

  • path [optional]: string pointing to the file that will be monitored. This file does not need to exist until such time as you are ready to change levels in your process. Default: os.tmpdir() + 'aborsculpt.json'
  • loggers [required]: an array of Pino instances to adjust. Default: []
  • interval [optional]: the number of milliseconds between scans of the specified file. Default: 60_000

Level Change File Format

The file being monitored must be a valid JSON file. It can contain two possible formats:

{"level": "levelName"}

or

{
  "levels": [
    "levelName",
    "levelName"
  ]
}

In the first case, the single level will be applied to all loggers supplied at construction. In the second case, each level will be applied to the corresponding logger in the loggers array. Note: if you supplied 5 loggers at construction, but only 3 in the file, then only the first 3 loggers will have their levels changed. But be aware, Pino will change the level of child loggers when the parent logger's level is changed.

All level names must be valid level names as registered with the target Pino instances.

License

MIT License