From: Pierre Ossman Date: Thu, 26 Apr 2012 14:27:52 +0000 (+0000) Subject: The old Windows viewer was capable of logging to file. This is essential X-Git-Tag: v1.2.90~178 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c8719ad18c1f77b2fb15651634fc2bc468008ebf;p=tigervnc.git The old Windows viewer was capable of logging to file. This is essential on Windows as stdout/stderr don't work well there. Make sure the new viewer also has this functionality. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4907 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx index 47fd5516..fd1243ec 100644 --- a/vncviewer/vncviewer.cxx +++ b/vncviewer/vncviewer.cxx @@ -290,6 +290,11 @@ int main(int argc, char** argv) bind_textdomain_codeset("libc", "UTF-8"); rfb::initStdIOLoggers(); +#ifdef WIN32 + rfb::initFileLogger("C:\\temp\\vncviewer.log"); +#else + rfb::initFileLogger("/tmp/vncviewer.log"); +#endif rfb::LogWriter::setLogParams("*:stderr:30"); #ifdef SIGHUP