You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm having a some issues with enabling debug namespaces dynamically using debug.enable(). it seems that when i enable one thing and then enable something else, the first thing i enabled is no longer enabled?
i've remedied this for now by enabling the root namespace with a wildcard and everything is fine.
heres some of the code
constsetLogOutputs=(self,scope,log)=>{if(!log){self.log=debug(scope)debug.enable(`${scope}*`)// DOING NOW}else{self.log=log.extend(scope)}self.log.error=self.log.extend('error')if(self.events){self.log.log=(...p)=>{try{self.events.emit('debug', ...p)}catch(e){console.error(e)}}self.log.error.log=(...p)=>{try{self.events.emit('error', ...p)}catch(e){console.error(e)}debug.enable(`${self.log.namespace},${self.log.error.namespace}`)// DID BEFORE}self.events.on('error',console.log)}}
The text was updated successfully, but these errors were encountered:
i'm having a some issues with enabling debug namespaces dynamically using debug.enable(). it seems that when i enable one thing and then enable something else, the first thing i enabled is no longer enabled?
i've remedied this for now by enabling the root namespace with a wildcard and everything is fine.
heres some of the code
The text was updated successfully, but these errors were encountered: