adobe / adobe/aio-lib-core-logging

Debug label not intuitive, should be log prefix?

Open
#6 1 comment 0 reactions 1 assignee Claimed by @rajarju View on GitHub
enhancement good first issue help wanted
Dominant language
JavaScript
Stars
3
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.