Bunyan
debug
Our great sponsors
Bunyan | debug | |
---|---|---|
12 | 26 | |
7,128 | 10,994 | |
- | 0.4% | |
0.0 | 3.6 | |
7 months ago | 7 months ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Bunyan
- Structured Logging with Slog
-
Logging in your API
NodeJS -> Pino, Winston, Bunyan, Npmlog, e.t.c.
-
7 Best Node.js Logging Libraries for Your Next Projects
Bunyan is also another popular and fast JSON Node.js logging library. Just like Winston, it also supports logging into multiple transport options. Other features include a neat-printing CLI for logs, a log filter, serializers for rendering objects, snooping system, and the ability to support multiple runtime environments such as NW.js and WebPack. Bunyan enforces the JSON format for logs.
-
Node.js: How to Power Up Your Logging
bunyan argues that logs should be structured and that JSON is a good format for that. It describes itself as a “simple and fast JSON logging library” and has all the features you would expect from a logging library, including serializers and support for different runtime environments including Node.js, Browserify and Webpack.
-
Understanding the dependency inversion principle in TypeScript
Suppose that after some time you decide that the winston logger library was not the best logger for your project and you want to use Bunyan, what do you do? You just need to create a BunyanLogger class that implements the ILogger interface and it is ready to be used by the UserService.
-
Patterns and Anti-patterns in Node.js
Bunyan: Another popular logging library that outputs in JSON by default.
-
Top 15 libraries you should use for every Node Express backend project.
bunyan
-
Designing Error Messages and a Logging Strategy in Node.js
Are there more options? Absolutely: Bunyan, Pino, and others. It depends on what your particular logging needs are.
-
Open Sourcing URL Shortener
With the increasing number of requests and possibly errors, we needed a proper logging setup to debug and monitor the service. That’s why we chose bunyan to log insightful data in our application. These logs sit conveniently on our new logging pipeline running on EFK (or, Elasticsearch Fluentd Kibana) stack. While this deserves a separate blog post on its own, let’s take a brief look at how the logs travel from our application to the kibana dashboard.
-
Best Practices for Logging in Node.js
Bunyan — Another feature-rich logging framework that outputs in JSON by default and provides a CLI tool for viewing your logs.
debug
-
Conditional logging
Another way to solve this is to have the logs in place, but only enable them conditionally. If you enable all the logs are the time, you only get a lot of noise that won't help you. If you are using JavaScript, you can use the package debug to add logs that are active by the DEBUG environment variable.
-
Has anyone figured out how to enable the millisecond diff feature in the debug package?
I'm using the debug package: https://www.npmjs.com/package/debug, but some reason I don't see millisecond diffs, which would be really useful.
- Help I have a JavaScript Lib that blows away competition but nobody knows of it
-
What is the DEBUG 🐛 environment variable in Node.js, and how to use it?
Although it's used by Express, it's indeed more broadly, the way a popular NPM package called debug works, which is used internally in Express too. Under the hood, the debug package expects the DEBUG environment variable to determine what debug messages to print (could be on the console, or into a file, or into stdout to be collected by a log aggregator service).
-
Automating console logs for dev but removing for prod?
Finally, if they're logs you want to be able to inspect in production without printing them to the console by default, you can use debug.
-
After having used many loggers/debuggers...
It is a drop-in, TypeScript replacement to enhance the widely popular https://www.npmjs.com/package/debug (230k weekly downloads).
-
Create a Node.js command-line library with NRWL NX workspace
debug - npm - Required. A popular library to write debug logs.
-
Debugging Figma and other packaged Electron apps in Visual Studio Code
I strongly recommend using the debug package from NPM to organize your log messages
-
Is it bad practice to log within a shared library?
Use the [debug npm library](https://www.npmjs.com/package/debug) to disable your logging unless someone provides the right environment variable (e.g. DEBUG=* which enables all logging)
-
Debug build vs Prod build
A lot of tools rely on the NODE_ENV environment variable for that, React included. Another great package that’s pretty popular is https://www.npmjs.com/package/debug You can create namespaces and then filter the logs you are interested in.
What are some alternatives?
pino - 🌲 super fast, all natural json logger
node-inspector - Node.js debugger based on Blink Developer Tools
winston - A logger for just about everything.
npm-fast-installer - npm-fast-installer - NPM install configuration in top of YAML for fast NPM install usage.
console-log-level - The most simple logger imaginable
bugger - Bugs bugging you? Bug back.
tracer for node.js - A powerful and customizable logging library for node.js
ndb - ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools
storyboard - End-to-end, hierarchical, real-time, colorful logs and stories
longjohn - Long stack traces for node.js inspired by https://github.com/tlrobinson/long-stack-traces
log4js-node - A port of log4js to node.js
swagger-stats - API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.