Index: /cpp/common/log.cpp
===================================================================
--- /cpp/common/log.cpp	(revision 510)
+++ /cpp/common/log.cpp	(revision 511)
@@ -9,33 +9,4 @@
 
 const char* LOG_LEVEL[] = { "[DEBUG] ", "", "[WARN] ", "[ERROR] ", "[CRITICAL] " };
-
-void logMessage(const char *obj, const char *method, int level, const char *msg)
-{
-	int line = 0; //all lines except the first one get the "..." prefix
-	const char* nextsep;
-	do
-	{
-		nextsep = strchr(msg, '\n');
-		if (nextsep == NULL) //last chunk, until the end
-			nextsep = strchr(msg, '\0');
-		if ((nextsep > msg) && (nextsep[-1] == '\r'))
-			nextsep--;
-		if (line == 0)
-		{
-			if (*nextsep == 0) //there was only one line! no need to modify it in any way.
-				_logMessageSingleLine(obj, method, level, msg);
-			else //first line from multi-line
-				_logMessageSingleLine(obj, method, level, string(msg, nextsep - msg).c_str());
-		}
-		else //consecutive lines from multi-line
-			_logMessageSingleLine(obj, method, level, (LOG_MULTILINE_CONTINUATION + string(msg, nextsep - msg)).c_str()); //could also add line numbers like ...(3)... but let's keep the prefix short and simple
-		line++;
-		if ((nextsep[0] == '\r') && (nextsep[1] == '\n'))
-			msg = nextsep + 2;
-		else if (*nextsep)
-			msg = nextsep + 1;
-	} while (*nextsep);
-}
-
 
 void logPrintf_va(const char *obj, const char *method, int level, const char *msgf, va_list va)
Index: /cpp/common/log.h
===================================================================
--- /cpp/common/log.h	(revision 510)
+++ /cpp/common/log.h	(revision 511)
@@ -18,7 +18,4 @@
 void logMessage(const char *obj, const char *method, int level, const char *msg);
 
-void _logMessageSingleLine(const char *obj, const char *method, int level, const char *msg); //don't call this directly - it is used internally
-
-
 
 //level (importance) of a message
Index: /cpp/common/loggers/loggers.cpp
===================================================================
--- /cpp/common/loggers/loggers.cpp	(revision 510)
+++ /cpp/common/loggers/loggers.cpp	(revision 511)
@@ -5,6 +5,7 @@
 #include "loggers.h"
 #include <common/stl-util.h>
+#include <string.h>
 
-void _logMessageSingleLine(const char *obj, const char *method, int level, const char *msg)
+void logMessage(const char *obj, const char *method, int level, const char *msg)
 {
 	tlsGetRef(message_handler_manager_instance).send(obj, method, level, msg);
@@ -101,4 +102,32 @@
 }
 
+void LoggerBase::handle(const char *obj, const char *method, int level, const char *msg)
+{
+	int line = 0; //all lines except the first one get the "..." prefix
+	const char* nextsep;
+	do
+	{
+		nextsep = strchr(msg, '\n');
+		if (nextsep == NULL) //last chunk, until the end
+			nextsep = strchr(msg, '\0');
+		if ((nextsep > msg) && (nextsep[-1] == '\r'))
+			nextsep--;
+		if (line == 0)
+		{
+			if (*nextsep == 0) //there was only one line! no need to modify it in any way.
+				handleSingleLine(obj, method, level, msg);
+			else //first line from multi-line
+				handleSingleLine(obj, method, level, string(msg, nextsep - msg).c_str());
+		}
+		else //consecutive lines from multi-line
+			handleSingleLine(obj, method, level, (LOG_MULTILINE_CONTINUATION + string(msg, nextsep - msg)).c_str()); //could also add line numbers like ...(3)... but let's keep the prefix short and simple
+		line++;
+		if ((nextsep[0] == '\r') && (nextsep[1] == '\n'))
+			msg = nextsep + 2;
+		else if (*nextsep)
+			msg = nextsep + 1;
+	} while (*nextsep);
+}
+
 /////////////////////////////////
 
Index: /cpp/common/loggers/loggers.h
===================================================================
--- /cpp/common/loggers/loggers.h	(revision 510)
+++ /cpp/common/loggers/loggers.h	(revision 511)
@@ -71,5 +71,6 @@
 	}
 
-	virtual void handle(const char *obj, const char *method, int level, const char *msg) {}
+	virtual void handle(const char *obj, const char *method, int level, const char *msg); ///< implemented by loggers accepting multiline messages. if not implemented, the default handle() splits multiline text into single lines and calls handleSingleLine()
+	virtual void handleSingleLine(const char *obj, const char *method, int level, const char *msg) {}  ///< implemented by loggers expecting single line messages
 };
 
Index: /cpp/common/loggers/loggertostdout.cpp
===================================================================
--- /cpp/common/loggers/loggertostdout.cpp	(revision 510)
+++ /cpp/common/loggers/loggertostdout.cpp	(revision 511)
@@ -27,5 +27,5 @@
 }
 
-void LoggerToStdout::handle(const char *obj, const char *method, int level, const char *msg)
+void LoggerToStdout::handleSingleLine(const char *obj, const char *method, int level, const char *msg)
 {
 	if (level < -1) level = -1; else if (level>3) level = 3;
Index: /cpp/common/loggers/loggertostdout.h
===================================================================
--- /cpp/common/loggers/loggertostdout.h	(revision 510)
+++ /cpp/common/loggers/loggertostdout.h	(revision 511)
@@ -14,5 +14,5 @@
 public:
 	LoggerToStdout(int opts = 0, VirtFILE *_file = NULL);
-	void handle(const char *obj, const char *method, int level, const char *msg);
+	void handleSingleLine(const char *obj, const char *method, int level, const char *msg);
 
 	static const char* default_log_format[];
