clog
can be used to redirect some of the errors to
another recipient. For example, you might want to redirect them to
a file named my_err:
ofstream out("my_err");
if ( out )
clog.rdbuf(out.rdbuf());
else
cerr << "Error while opening the file" << endl;
Then when you are doing something like clog <<
"error number x"; the error message is output to the file
my_err. Obviously, you can use the same scheme to
redirect
clog
to other devices.