Skip to content

PR for overriding formatArgs #782

Closed
Closed
@basaran

Description

@basaran

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];
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions