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 🙏

© 2026 – Pkg Stats / Ryan Hefner

roip-logger

v0.0.54

Published

Standard Logger Module

Readme

RoIP Logger Module

Environment

  • LOG_LEVEL: (optional: default 'debug') debug, info, notice, warning, error, crit, alert, emerg. Production deployments should typically use 'info' level.

Console Log Configuration

  • LOG_CONSOLE_ENABLED: (optional: defaults to true) Set to true or yes, Enables file console transport.

File Log Configuration

  • LOG_FILE_ENABLED: (optional: defaults to true) Set to true or yes, Enables file logging transport.
  • LOG_FILE_PATH: (optional: default cwd/log/#{NODE_ENV}.log) Path for log file.

Syslog Configuration

Syslog can be enabled by setting LOG_SYSLOG_ENABLED environment variable. All other parameters are optional.

  • LOG_SYSLOG_ENABLED: (optional: defaults to 'false') Set to true or yes, Enables syslog logging transport.
  • LOG_SYSLOG_HOST: (optional: defaults to 'localhost') Syslog host
  • LOG_SYSLOG_PORT: (optional: defaults to 514) Syslog port
  • LOG_SYSLOG_PATH: (optional: defaults to null) Syslog path
  • LOG_SYSLOG_APP_ID: (optional: defaults to null) Syslog APP ID
  • LOG_SYSLOG_LOCALHOST: (optional: defaults to 'localhost') localhost as reported to syslog
  • LOG_SYSLOG_PROTOCOL: (optional: defaults to udp4) Syslog protocol (Values: udp,unix,tcp)
  • LOG_SYSLOG_TYPE: (optional: defaults to 'BSD') Syslog type
  • LOG_SYSLOG_FACILITY: (optional: defaults to 'local0') Syslog facility
  • LOG_SYSLOG_PID: (optional: defaults to process.pid) Process ID for reporting to syslog
  • LOG_SYSLOG_APP_NAME: (optional: defaults to process.title) Process title for reporting to syslog

Get Started

Configure package.json

{
  ...
  "dependencies": {
    "roip-logger": "git+ssh://[email protected]:OnCircle/node-logger.git"
  },
}

Examples:

# Start using logger module:
logger = require "roip-logger"

logger.debug("Message", obj1)
logger.debug("Message", obj1, "and here", obj3)
logger.error(err)
logger.error("Error is here:", err)
logger.warning("warning is here")
logger.warning("warning is here", err)
logger.info("some info message")
logger.emerg("something really bad happened")
logger.log("info", "aaaa", "bbb")
logger.log("debug", "aaaa", "bbb")

# Error logging with stack trace
logger.error(err)
logger.error("Caught some error:", err)
logger.warning("Caught some error:", err)
logger.info(err)

# Express Request Logger and Error Handler
# As a convenience, logger provides logger.expressRequestLogger and logger.expressErrorHandler
# Typically, expressRequestLogger is configured as the first middleware and expressErrorHandler is configured last.
app.disable('x-powered-by')
app.use logger.expressRequestLogger
app.use express.limit('1mb')
app.use express.timeout(5000)
app.use utils.allowCrossDomain
app.use express.methodOverride()
app.use express.bodyParser()
app.use app.router
app.use logger.expressErrorHandler

Additional Notes

  • You can log complete objects using logger. They will be dumped into the log using util.inspect().
  • You can send Error objects to the logger, they will be dumped in the log along with their stack traces (if present).
  • Messages longer than 1024 characters long will be truncated.
  • Generally, use logger.debug for debug messages during development. Production systems are set to "info" LOG_LEVEL, so any debug messages are not logged in production.

Execution Time Profiler

logger.profile "MyMegaAsyncOperation"
  # perform async operation
  logger.profile "MyMegaAsyncOperation"