Skip to content

[RFC] child debug instances #399

@thebigredgeek

Description

@thebigredgeek

discuss!

const log1 = debug('foo');
log1.use((data, next) => ... ); //apply some new middleware
const log2 = log.child('bar');
// uses middleware of ancestors unless overridden on this instance
log2('hello world'); // => foo:bar hello world

Metadata

Metadata

Labels

discussionThis issue is requesting comments and discussionfeatureThis proposes or provides a feature or enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions