Lets replace all cout << ... with ilog( "message ${var}", ("var",var) ) calls so that it will work with our logging infrastructure.