ofLog auto spacing

I recently discovered ofLog::setAutoSpace(), but I am not sure how to use it correctly. And I haven’t seen it in any of the examples.

ofLogError error(“module”);
error.setAutoSpace(true);
error<<“this”<<“is”<<“just”<<“a”<<“demonstration”;

would produce:
[ error ] module: this is just a demonstration

Is it possible to set the auto spacing globally?
Something like:

//ofSetLogAutoSpace(true);
ofSetLogAutoSpace(“module”, true);
ofLogError(“module”)<<“this”<<“is”<<“just”<<“a”<<“demonstration”;

I would even set it by default.

Thomas

setAutoSpace is actually an static method so calling it will change the behaviour globally. you can call it like:

ofLog::setAutoSpace(true)

we had it as default for a couple of versions but some people complained that it wasn’t very standard and we made it optional.

Sorry, my bad, it’s been a long day. I was using it in another class’ constructor before i called the static method in ofApp::setup().

Thanks for your answer Arturo.