No output on Node.js
See original GitHub issueToday I tried to use logdown v3.2.2 but when running my script I don’t see log output from logdown. Am I doing something wrong?
const logdown = require('logdown');
const logger = logdown('MyLoggerPrefix', {
logger: console,
prefixColor: '#FF0000'
});
logger.log('My log message with logdown.');
console.log('My log message with console.log');
Screenshot
Runkit
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
node.js - NodeJS programs fail, exiting with no output
The problem was that I had a package called "node - Amateur Packet Radio Node program (transitional package)" (note: this is NOT nodejs)...
Read more >Issue - Node.js run scripts with no output - Plesk Forum
Hi. I have a problem with running Node.js scripts in Plesk. When I run some scripts in the "Run Script" section of the...
Read more >No output from function node? - General - Node-RED Forum
I'm currently working on it and managed to print everything I want on the console, but once I want to pass it through...
Read more >Command-line API | Node.js v19.3.0 Documentation
If no corresponding file is found, an error is thrown. If a file is found, ... Set the directory to which all diagnostic...
Read more >Output to the command line using Node.js
How to print to the command line console using Node.js, from the basic console.log to more complex scenarios. ... Basic output using the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The behavior was changed to mimic debuglog which is the NodeJS debugger utility. debug.js mimics it.
As a pattern, we usually set the env before a script, e.g.: https://github.com/reactjs/redux/blob/master/package.json#L26
Hi, @bennyn. This is because you haven’t set
DEBUG
orNODE_DEBUG
env var (e.g.$ DEBUG=* node ./index.js
). As I know this currently expected behavior.You can try the following snippet to see the difference:
I think, we can discuss this behavior if it seems to be not that clear or expected