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

Text encoder ignoring colorize option of false #4

Closed
bradhowes opened this issue Jul 18, 2012 · 1 comment
Closed

Text encoder ignoring colorize option of false #4

bradhowes opened this issue Jul 18, 2012 · 1 comment
Assignees
Labels

Comments

@bradhowes
Copy link

I was unable to get a new lumber.encoders.Text to honor a 'colorize' setting of false. I believe the code that sets the colorize option is incorrect:

self.colorize = options.colorize || true;

I've instead patched the Text constructor to do this:

function valid_option(value, def) {
    return (typeof value === "undefined") ? def : value;
}

self.colorize = valid_option(options.colorize, true);
self.timestamp = valid_option(options.timestamp, false);
self.headFormat = valid_option(options.headFormat, '%l: ');
self.dateFormat = valid_option(options.dateFormat, 'isoDateTime');
@englercj
Copy link
Owner

Good catch, I will fix this in the next couple days after I finish up some other work.

@ghost ghost assigned englercj Jul 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants