Add an option to nest context name instead of replace in log
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
When passing loggers to other objects, it's sometimes useful to preserve the parent context name. For example, when running multiple nodes:
Currently:

With patch:

Patch used above (this is just an example, it can be made optional and custom separators, etc.):
```diff
diff --git a/old.js b/new.js
index 3d37a4c..bcbdc15 100644
--- a/old.js
+++ b/new.js
@@ -814,7 +814,7 @@ class LoggerContext {
*/
context(module) {
- return new LoggerContext(this.logger, module);
+ return new LoggerContext(this.logger, this.module + ':' + module);
}
/**
```
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names the LoggerContext.context(module) entry point but no source file or test. Start by locating that method and tracing how context names are replaced when loggers are passed to other objects; review existing API usage before settling option and separator behavior. Done means nested names are optionally preserved while current replacement behavior remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100