>Both the messages were displayed in console. But, i am designing my
>application which uses log4cxx, in such a way that it won't have any console
>window. In such a case where the messages logged ?
We faced the same issue and ended up redirecting stderr:
//First redirect stderr for initialization error handling
CString logInitErrorFile("myapp.log");
freopen(logInitErrorFile, "w", stderr);
Then, when we are done initializing, we set it back:
// And now back to the console once again for stderr
freopen("CON", "w", stderr);
Since you have no console, you could skip the second step I assume. This is
windows specific of course, but I'm sure
you could do the same on whatever OSes you need.
-Andy