Open moritzraho opened 4 years ago
test.js:
test.js
const logger = require('@adobe/aio-lib-core-logging')('myapp', { provider: './DebugLogger' }) logger.debug('yo!')
DEBUG=myapp node test.js => should print yo!
DEBUG=myapp node test.js
yo!
Need to add a * to the DEBUG env var DEBUG=myapp* node test.js => prints yo!
*
DEBUG=myapp* node test.js
This is because the debug label is extended with action name and log level
suggestion: preserve the user given debug key but add a string prefix to each log message
Agree, this should be consistent for all loggers
Expected Behaviour
test.js
:DEBUG=myapp node test.js
=> should printyo!
Actual Behaviour
Need to add a
*
to the DEBUG env varDEBUG=myapp* node test.js
=> printsyo!
This is because the debug label is extended with action name and log level
suggestion: preserve the user given debug key but add a string prefix to each log message