Winston is a pretty good logging library. You can write logs out to a file using it.
Code would look something like:
Copyvar winston = require('winston');
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({ json: false, timestamp: true }),
new winston.transports.File({ filename: __dirname + '/debug.log', json: false })
],
exceptionHandlers: [
new (winston.transports.Console)({ json: false, timestamp: true }),
new winston.transports.File({ filename: __dirname + '/exceptions.log', json: false })
],
exitOnError: false
});
module.exports = logger;
You can then use this like:
Copyvar logger = require('./log');
logger.info('log to file');
Answer from Charlie Key on Stack OverflowFacebook
facebook.com › JSLOGGINGPARTSANDSUPPLIES
JS Logging Parts and Supplies, llc | Saint Johnsville NY | Facebook
JS Logging Parts and Supplies, llc, Saint Johnsville. 5,315 likes · 3 talking about this · 8 were here. Provide Logging Parts and Supplies to individuals in the forestry industry.
Videos
Logging in JavaScript the right way
16:41
JavaScript Console Logging Essentials - YouTube
Ditch console.log() by building your own custom logger in ...
05:51
JavaScript for Beginners — Console Logging - YouTube
09:41
The BEST Way to Log in Node.js - Winston - YouTube
10:27
How to Configure Winston Logging in Node.js: Step-by-Step Tutorial ...
Which JavaScript logging library works in the browser and Node.js?
LogTape and Sentry's logger are the only options in this comparison that run natively across all runtimes; Node, Deno, Bun, browsers, and edge (Cloudflare Workers, Vercel Edge Functions). Pino and Winston are Node.js only (Pino can run in the browser via polyfill, but loses performance benefits).
blog.sentry.io
blog.sentry.io › javascript-logging-library-definitive-guide
Choosing a JavaScript Logging Library: The 2026 Definitive Guide ...
What is the fastest JavaScript logging library?
LogTape reports ~2x faster than Pino and over 10x faster than Winston.
blog.sentry.io
blog.sentry.io › javascript-logging-library-definitive-guide
Choosing a JavaScript Logging Library: The 2026 Definitive Guide ...
What is trace-connected logging?
Trace-connected logging automatically links log entries to the distributed trace they were emitted during. This means when debugging an error in Sentry, you can see the exact log lines that occurred within the same request trace, without manually correlating IDs.
blog.sentry.io
blog.sentry.io › javascript-logging-library-definitive-guide
Choosing a JavaScript Logging Library: The 2026 Definitive Guide ...
DEV Community
dev.to › dangolant › what-js-logging-library--tool-do-you-use-5e8
What JS Logging library / tool do you use? - DEV Community
September 14, 2018 - By default, only Error and Warning message will show up in the console in browsers, meaning you can log as much as you want and only those people that are interested in it will actually see it. You can just leave your log statements in your production code. In Node JS we use INFO as the default level because there the 'users' are mostly developers / server admins etc who are more interested in our logging.
Sentry
blog.sentry.io › javascript-logging-library-definitive-guide
Choosing a JavaScript Logging Library: The 2026 Definitive Guide | Sentry Blog
March 16, 2026 - LogTape and Sentry's logger are the only options in this comparison that run natively across all runtimes; Node, Deno, Bun, browsers, and edge (Cloudflare Workers, Vercel Edge Functions). Pino and Winston are Node.js only (Pino can run in the browser via polyfill, but loses performance benefits).
GitHub
github.com › winstonjs › winston
GitHub - winstonjs/winston: A logger for just about everything. · GitHub
A logger for just about everything. Contribute to winstonjs/winston development by creating an account on GitHub.
Starred by 24.5K users
Forked by 1.8K users
Languages JavaScript 99.2% | TypeScript 0.8%
Top answer 1 of 10
204
Winston is a pretty good logging library. You can write logs out to a file using it.
Code would look something like:
Copyvar winston = require('winston');
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({ json: false, timestamp: true }),
new winston.transports.File({ filename: __dirname + '/debug.log', json: false })
],
exceptionHandlers: [
new (winston.transports.Console)({ json: false, timestamp: true }),
new winston.transports.File({ filename: __dirname + '/exceptions.log', json: false })
],
exitOnError: false
});
module.exports = logger;
You can then use this like:
Copyvar logger = require('./log');
logger.info('log to file');
2 of 10
60
Scribe.JS Lightweight Logger
I have looked through many loggers, and I wasn't able to find a lightweight solution - so I decided to make a simple solution that is posted on github.
- Saves the file which are organized by user, date, and level
- Gives you a pretty output (we all love that)
- Easy-to-use HTML interface
I hope this helps you out.
Online Demo
http://bluejamesbond.github.io/Scribe.js/
Secure Web Access to Logs

Prints Pretty Text to Console Too!

Web Access

Github
https://github.com/bluejamesbond/Scribe.js
LaunchDarkly
launchdarkly.com › docs › tutorials › nodejs-logging-libraries
5 Best Node.js Logging Libraries | LaunchDarkly | Documentation
Winston logs only messages in levels from info to error. To see all messages, you have to assign a level property to the config object: Currently, the code in our winston_demo.js file prints JSON logs without dates.
GitHub
github.com › visionmedia › log.js
GitHub - tj/log.js: super light-weight nodejs logging + streaming log reader · GitHub
Starred by 371 users
Forked by 82 users
Languages HTML 72.1% | JavaScript 26.2% | Makefile 1.7%
npm
npmjs.com › package › js-logging
js-logging - npm
A powerful, feature rich and customizable logging library for node.js and any browser.. Latest version: 0.1.0, last published: 10 years ago. Start using js-logging in your project by running `npm i js-logging`. There are 1 other projects in the npm registry using js-logging.
» npm install js-logging
Published Jun 05, 2016
Version 0.1.0
University of Illinois Urbana-Champaign
registrar.illinois.edu › academic-records › dars-audit
Degree Audit | Office of the Registrar | Illinois
Once logged in, if a degree audit has been run in the past, you will see the most recently run audit. If no previous degree audits have been run, you will be taken to the welcome page. From the welcome page, you can run an audit by clicking the “Request Audit” button or select “Request ...
CrowdStrike
crowdstrike.com › en-us › guides › nodejs-logging
Node.js Logging: The Basics
September 19, 2024 - When troubleshooting issues with your application, you can proactively add console logging statements to your code for certain edge cases. You can also add them retroactively to narrow down when and where issues are occurring. The following example shows calls to the different functions from the console class. ... When running your Node.js application via the terminal, both the error and log message streams are available to you, and all messages appear in the format shown below:
Amodshinde
amodshinde.com › blog › nodejs-logging
Best Practices for Logging in Node.js | Personal Blog
October 19, 2020 - One of the main goals of logging is to enable post-mortem debugging, which involves reading log entries and reconstructing the steps that led to an event in the system. Thus human-readable and easily understandable, descriptive messages will help developers and sysadmins. It’s also important to use a structured format that is easy to parse by machines. One of the best practices is to use JSON for logging as it is easily readable by humans as well as can be parsed by machines and can be easily converted to other formats.
Better Stack
betterstack.com › docs › logs › javascript › logging
JavaScript advanced usage | Better Stack Documentation
logtail.warn("Something is not quite right.", { user: { username: "John Doe", email: "john@example.com" }, additional_info: { tried_accessing: "/url/of/error" } }); ... { "dt":"2022-02-01 12:01:10.127 UTC", "context":{ "runtime":{ "column_integer":"8", "file_string":"index.js", "line_integer":"29", "type_string":"Object" }, "system":{ "main_file_string":"/mnt/d/js_logtail/index.js", "pid_integer":"4193" } }, "level_string":"warn", "message_string":"Something is not quite right.", "additional_info":{ "tried_accessing_string":"/url/of/error" }, "user":{ "email_string":"someuser@example.com", "username_string":"someuser" } }