signale icon indicating copy to clipboard operation
signale copied to clipboard

Conditional logging based on scope

Open OmgImAlexis opened this issue 4 years ago • 1 comments

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.

OmgImAlexis avatar Feb 01 '20 03:02 OmgImAlexis

+1

Oxicode avatar Feb 10 '20 18:02 Oxicode