Skip to content

[RFC] child debug instances #399

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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