Skip to content

Conditional logging based on scope #102

@OmgImAlexis

Description

@OmgImAlexis

Is your feature request related to a problem? Please describe.
With larger applications it can be easier to have just a single scope logging while you debug, etc.

Describe the solution you'd like

log.update({ scope: 'a:b:c' }); // Only a:b:c scope
log.update({ scope: 'a:*' }); // `a` and all child scopes
log.update({ scope: '*' }); // Default value

The suggested way to use this would be like so.

if (process.env.DEBUG) {
	log.update({ scope: process.env.DEBUG });
}

Additional context
Essentially I want the namespace filter debug has.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions