Bunyan (Node.js Logger)
github.com
5
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Bunyan is a simple and fast JSON logging library for Node.js services, created by Trent Mick (formerly of Joyent) in 2012. Bunyan's design philosophy centers on the idea that logs should be machine-readable JSON records first, human-readable second, which makes them trivially parseable, searchable, and transportable to centralized logging systems. Each log record is a JSON object containing a core set of fields: name (logger name), hostname (machine hostname), pid (process ID), level (numeric log level: trace 10, debug 20, info 30, warn 40, error 50, fatal 60), msg (message string), time (ISO 8601 timestamp), and v (bunyan log format version), plus any custom fields the application adds. Bunyan provides a unique feature called child loggers, which automatically add context fields to all subsequent log records, making it easy to trace request-scoped data like request IDs, user IDs, and session IDs through distributed systems. The library supports multiple output streams (streams) where different log levels can be routed to different destinations (stdout, file, rotating file, network socket), and supports custom stream types. Bunyan includes a CLI tool (bunyan) that pretty-prints JSON log output with colorized, human-readable formatting, level filtering, and condition expressions. The library also supports DTrace integration on Solaris, SmartOS, and macOS for dynamic tracing of log calls without code changes. Bunyan is widely used in production at Joyent, Nodejitsu, and many other companies running large-scale Node.js deployments. The project is available under the MIT License with over 7,300 GitHub stars.
Statistics
5
Views
0
Clicks
0
Like
0
Dislike