Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for overriding formatArgs #782

Closed
basaran opened this issue Sep 17, 2020 · 1 comment
Closed

PR for overriding formatArgs #782

basaran opened this issue Sep 17, 2020 · 1 comment

Comments

@basaran
Copy link

basaran commented Sep 17, 2020

Hello,

May I send a PR to allow overriding the formatArgs method? Similar to debug.log? I found no way to disable the date from TTY, and this could be useful for other things as well.

// apply env-specific formatting (colors, etc.)
var formatFn = debug.formatArgs || exports.formatArgs;
formatFn.call( self, args );
// exports.formatArgs.call( self, args );

so that later, once can do with their own module:

    debug.formatArgs = function ( args ) {
        var name = this.namespace;
        args[0] = name + " " + args[0];
    };
@Qix-
Copy link
Member

Qix- commented Sep 17, 2020

There's already plans for this in v5. See #556.

@Qix- Qix- closed this as completed Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants