adobe / aio-lib-core-logging

Node.js Logger module for use by the Adobe I/O SDK
https://adobe.io
Apache License 2.0
2 stars 4 forks source link

Debug label not intuitive, should be log prefix? #6

Open moritzraho opened 4 years ago

moritzraho commented 4 years ago

Expected Behaviour

test.js:

const logger = require('@adobe/aio-lib-core-logging')('myapp', { provider: './DebugLogger' })
logger.debug('yo!')

DEBUG=myapp node test.js => should print yo!

Actual Behaviour

Need to add a * to the DEBUG env var DEBUG=myapp* node test.js => prints yo!

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

shazron commented 4 years ago

Agree, this should be consistent for all loggers