diff --git a/cmd/synergyc/synergyc.cpp b/cmd/synergyc/synergyc.cpp
--- a/cmd/synergyc/synergyc.cpp
+++ b/cmd/synergyc/synergyc.cpp
@@ -77,7 +77,8 @@
 		m_yscroll(0),
 		m_logFilter(NULL),
 		m_display(NULL),
-		m_serverAddress(NULL)
+		m_serverAddress(NULL),
+		m_logFile(NULL)
 		{ s_instance = this; }
 	~CArgs() { s_instance = NULL; }
 
@@ -92,6 +93,8 @@
 	const char*			m_display;
 	CString 			m_name;
 	CNetworkAddress* 	m_serverAddress;
+	const char*			m_logFile;
+
 };
 
 CArgs*					CArgs::s_instance = NULL;
@@ -375,6 +378,17 @@
 int
 mainLoop()
 {
+	// logging to files
+	CFileLogOutputter* fileLog = NULL;
+
+	if (ARG->m_logFile != NULL) {
+		fileLog = new CFileLogOutputter(ARG->m_logFile);
+
+		CLOG->insert(fileLog);
+
+		LOG((CLOG_DEBUG1 "Logging to file (%s) enabled", ARG->m_logFile));
+	}
+
 	// create socket multiplexer.  this must happen after daemonization
 	// on unix because threads evaporate across a fork().
 	CSocketMultiplexer multiplexer;
@@ -395,6 +409,7 @@
 	CEvent event;
 	DAEMON_RUNNING(true);
 	EVENTQUEUE->getEvent(event);
+
 	while (event.getType() != CEvent::kQuit) {
 		EVENTQUEUE->dispatchEvent(event);
 		CEvent::deleteData(event);
@@ -408,6 +423,12 @@
 	updateStatus();
 	LOG((CLOG_NOTE "stopped client"));
 
+	if (fileLog)
+	{
+		CLOG->remove(fileLog);
+		delete fileLog;		
+	}
+
 	return kExitSuccess;
 }
 
@@ -472,7 +493,7 @@
 
 	// done with log buffer
 	CLOG->remove(&logBuffer);
-
+	
 	delete ARG->m_serverAddress;
 	return result;
 }
@@ -537,6 +558,7 @@
 "  -1, --no-restart         do not try to restart the client if it fails for\n"
 "                           some reason.\n"
 "*     --restart            restart the client automatically if it fails.\n"
+"  -l  --log <file>         write log messages to file.\n"
 "  -h, --help               display this help and exit.\n"
 "      --version            display version information and exit.\n"
 "\n"
@@ -626,6 +648,10 @@
 			// define scroll 
 			ARG->m_yscroll = atoi(argv[++i]);
 		}
+		
+		else if (isArg(i, argc, argv, "-l", "--log", 1)) {
+			ARG->m_logFile = argv[++i];
+		}
 
 		else if (isArg(i, argc, argv, "-1", "--no-restart")) {
 			// don't try to restart
diff --git a/cmd/synergys/synergys.cpp b/cmd/synergys/synergys.cpp
--- a/cmd/synergys/synergys.cpp
+++ b/cmd/synergys/synergys.cpp
@@ -89,6 +89,7 @@
 		m_daemon(true),
 		m_configFile(),
 		m_logFilter(NULL),
+		m_logFile(NULL),
 		m_display(NULL),
 		m_synergyAddress(NULL),
 		m_config(NULL)
@@ -103,6 +104,7 @@
 	bool				m_daemon;
 	CString		 		m_configFile;
 	const char* 		m_logFilter;
+	const char*			m_logFile;
 	const char*			m_display;
 	CString 			m_name;
 	CNetworkAddress*	m_synergyAddress;
@@ -652,6 +654,17 @@
 	// create the event queue
 	CEventQueue eventQueue;
 
+	// logging to files
+	CFileLogOutputter* fileLog = NULL;
+
+	if (ARG->m_logFile != NULL) {
+		fileLog = new CFileLogOutputter(ARG->m_logFile);
+
+		CLOG->insert(fileLog);
+
+		LOG((CLOG_DEBUG1 "Logging to file (%s) enabled", ARG->m_logFile));
+	}
+
 	// if configuration has no screens then add this system
 	// as the default
 	if (ARG->m_config->begin() == ARG->m_config->end()) {
@@ -723,6 +736,12 @@
 	updateStatus();
 	LOG((CLOG_NOTE "stopped server"));
 
+	if (fileLog)
+	{
+		CLOG->remove(fileLog);
+		delete fileLog;		
+	}
+
 	return kExitSuccess;
 }
 
@@ -875,6 +894,7 @@
 "  -1, --no-restart         do not try to restart the server if it fails for\n"
 "                           some reason.\n"
 "*     --restart            restart the server automatically if it fails.\n"
+"  -l  --log <file>         write log messages to file.\n"
 PLATFORM_DESC
 "  -h, --help               display this help and exit.\n"
 "      --version            display version information and exit.\n"
@@ -987,6 +1007,10 @@
 			// daemonize
 			ARG->m_daemon = true;
 		}
+		else if (isArg(i, argc, argv, "-l", "--log", 1)) {
+			// logging to file
+			ARG->m_logFile = argv[++i];
+		}
 
 		else if (isArg(i, argc, argv, "-1", "--no-restart")) {
 			// don't try to restart
diff --git a/lib/base/LogOutputters.cpp b/lib/base/LogOutputters.cpp
--- a/lib/base/LogOutputters.cpp
+++ b/lib/base/LogOutputters.cpp
@@ -15,6 +15,7 @@
 #include "LogOutputters.h"
 #include "CArch.h"
 
+#include <fstream>
 //
 // CStopLogOutputter
 //
@@ -265,3 +266,51 @@
 {
 	return "";
 }
+
+
+//
+// CFileLogOutputter
+//
+
+CFileLogOutputter::CFileLogOutputter(const char * logFile)
+{
+	assert(logFile != NULL);
+
+	handle.open(logFile, std::fstream::app);
+	// open file handle
+}
+
+CFileLogOutputter::~CFileLogOutputter()
+{
+	// close file handle
+	if (handle.is_open())
+		handle.close();
+}
+
+const char*
+CFileLogOutputter::getNewline() const
+{
+	return "\n";
+}
+
+bool CFileLogOutputter::write(ILogOutputter::ELevel level, const char *message)
+{
+	if (handle.is_open() && handle.fail() != true)
+	{
+		handle << message;
+		
+		// write buffer to file
+		handle.flush();
+	}
+
+	return true;
+}
+
+void
+CFileLogOutputter::open(const char *title) {}
+
+void
+CFileLogOutputter::close() {}
+
+void
+CFileLogOutputter::show(bool showIfEmpty) {}
\ No newline at end of file
diff --git a/lib/base/LogOutputters.h b/lib/base/LogOutputters.h
--- a/lib/base/LogOutputters.h
+++ b/lib/base/LogOutputters.h
@@ -20,6 +20,7 @@
 #include "CString.h"
 #include "stddeque.h"
 
+#include <fstream>
 //! Stop traversing log chain outputter
 /*!
 This outputter performs no output and returns false from \c write(),
@@ -65,7 +66,7 @@
 
 class CFileLogOutputter : public ILogOutputter {
 public:
-	CFileLogOutputter();
+	CFileLogOutputter(const char* logFile);
 	virtual ~CFileLogOutputter();
 
 	// ILogOutputter overrides
@@ -74,6 +75,8 @@
 	virtual void		show(bool showIfEmpty);
 	virtual bool		write(ELevel level, const char* message);
 	virtual const char*	getNewline() const;
+private:
+	std::ofstream handle;
 };
 
 //! Write log to system log
