Logger style when testing #187

hellonico opened this Issue Jul 18, 2012 · 7 comments


None yet

2 participants


Would it be possible to disable styling when logging to the console ?

Right now, the formatting style is applied and I get output like this when read from a text file:

\�[32;1mPASS�[0m Expected Content

Instead of the style WARN, INFO etc.. would be awesome.

Going beyond, I guess custom formatting of messages would be a super +.

CasperJS member

Sure, just set the colorizerType casper option to Dummy:

var casper = require('casper').create({
    colorizerType: 'Dummy'
@n1k0 n1k0 closed this Jul 18, 2012

Yes, it'd be perfect. But I am using the test command as a parameter in the CLI so not recreating a new casper object.

CasperJS member

You can hook the casper object by using the --includes option and pass it a script where you set the option:

// bootstrap.js
casper.options.colorizerType = 'Dummy';

Command line call:

$ casperjs test --includes=bootstrap.js your-test-script.js

Could you please confirm this works for you?

@n1k0 n1k0 reopened this Jul 18, 2012
CasperJS member

I may also be adding a --no-colors option… I'm reopening the issue.


hum ... I am on commit:

but this:
casper.options.colorizerType = 'Dummy';

did not make it. I am still getting colors.

CasperJS member

Hmm, commit 281d291 is 404 for me… please try with a fresh pull

@n1k0 n1k0 closed this in 1391561 Jul 18, 2012

yeah :)

The --no-colors option did it. Awesome.

Thanks for the quick turn around.

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