diff options
author | Adam Tkac <atkac@redhat.com> | 2011-01-26 19:09:03 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2011-01-26 19:09:03 +0000 |
commit | d41d4be5a41e735f56b700d4459a8f9c2d20bc41 (patch) | |
tree | 7dd572775864ba04d22ffcf6db565244510b7376 /win | |
parent | 125bd259b9eda1270f2fb85b0caded5b8780fe37 (diff) | |
download | tigervnc-d41d4be5a41e735f56b700d4459a8f9c2d20bc41.tar.gz tigervnc-d41d4be5a41e735f56b700d4459a8f9c2d20bc41.zip |
[Development] winvnc: Enable debug output when built with -D_DEBUG
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4242 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'win')
-rw-r--r-- | win/winvnc/winvnc.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx index b16fb601..1df0f769 100644 --- a/win/winvnc/winvnc.cxx +++ b/win/winvnc/winvnc.cxx @@ -224,15 +224,25 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prevInst, char* cmdLine, int cmdSho try { // - Initialise the available loggers //freopen("\\\\drupe\\tjr\\WinVNC4.log","ab",stderr); - //setbuf(stderr, 0); - initStdIOLoggers(); +#ifdef _DEBUG + AllocConsole(); + freopen("CONIN$", "rb", stdin); + freopen("CONOUT$", "wb", stdout); + freopen("CONOUT$", "wb", stderr); + setbuf(stderr, 0); + initStdIOLoggers(); + initFileLogger("C:\\temp\\WinVNC4.log"); + logParams.setParam("*:stderr:100"); +#else initFileLogger("C:\\temp\\WinVNC4.log"); + logParams.setParam("*:stderr:0"); +#endif rfb::win32::initEventLogLogger(VNCServerService::Name); Configuration::enableServerParams(); // - By default, just log errors to stderr - logParams.setParam("*:stderr:0"); + // - Print program details and process the command line programInfo(); |