clog << cout << "Attempt to chain streams. This sentence should be printed twice" << endl;
Instead of :
1 2
clog << "Attempt to chain streams. This sentence should be printed twice" << endl;
cout << "Attempt to chain streams. This sentence should be printed twice" << endl;
It is not clear for me from the reference manual :