Skip to content

Extending IDebugger doesn't retain the .log function #646

Description

@uphlewis
const debug = require('debug');
const log = debug('app');
log.log = console.log.bind(console); //log to stdout

log('Stdout test'); //writes "app Stdout test" to stdout 
log.extend('extended')('Stdout test'); //writes "app:extended Stdout test" to stderr 

Bit annoying if i want to have a base IDebugger for stdout and another for stderr, but i have to re-bind console.log whenever i want to extend the stdout debugger.

Activity

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

Metadata

Metadata

Assignees

Labels

bugThis issue identifies a malfunctionchange-patchThis proposes or provides a change that requires a patch releasehelp-wantedThis issue has an actionable itempr-welcomeThis issue has an approved change; a pull request would be appreciated

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions