help - how to enter app name
See original GitHub issuenode v8.11.4 oSX 10.13.5 Express 4.14.1
I’m having general problems. I can get debug to work using this only:
DEBUG=* node ./bin/www
. But then I see all the output for all express processes.
It will not accept my app name, which appears to here process.env.npm_package_name
.
I enter it like this DEBUG=appName node ./bin/www
This is true-
if(debug.enabled){ console.log('true') }
Logging the functions back works; they are not undefined.
In my app.js I’ve included this.
const log = debug('app:log')
const error = debug('app:error')
log.log = console.log.bind(console);
log('hello')
error('error')
When I used DEBUG=*
the error and log are both green, rather than one being red and one being green.
Sorry to post a help request here. If it’s out of line I can move it to SO. I found some good stuff here, but none of it seemed to work for me https://stackoverflow.com/questions/26112075/express-debug-module-not-working
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Yeah, sorry about that, that post is wrong. 😃 When in doubt, check the readme 💃
Right - you put in
DEBUG=foo:bar
- whatever you pass todebug()
you must also put in theDEBUG
variable. We don’t look atpackage.json
at all.