Index: cpp/frams/loggers/loggers.cpp
===================================================================
--- cpp/frams/mhandlers/mhandlers.cpp	(revision 373)
+++ cpp/frams/loggers/loggers.cpp	(revision 375)
@@ -3,15 +3,15 @@
 // See LICENSE.txt for details.
 
-#include "mhandlers.h"
+#include "loggers.h"
 #include <common/stl-util.h>
 
-void _HmessageSingleLine(const char *o, const char *m, const char *txt, int w)
+void _logMessageSingleLine(const char *o, const char *m, int w, const char *txt)
 {
-	tlsGetRef(message_handler_manager_instance).send(o, m, txt, w);
+	tlsGetRef(message_handler_manager_instance).send(o, m, w, txt);
 }
 
-THREAD_LOCAL_DEF(MessageHandlerManager, message_handler_manager_instance);
+THREAD_LOCAL_DEF(LoggerManager, message_handler_manager_instance);
 
-void MessageHandlerManager::send(int level, const char *o, const char *m, const char *bl, int w)
+void LoggerManager::send(int level, const char *o, const char *m, int w, const char *bl)
 {
 	if (level >= handlers.size()) level = handlers.size() - 1;
@@ -19,15 +19,15 @@
 	for (int i = level; i >= 0; i--)
 	{
-		MessageHandlerBase *r = handlers(i);
-		if ((!(r->options & MessageHandlerBase::Paused)) &&
-			((!blocked) || (r->options & MessageHandlerBase::CannotBeBlocked)))
+		LoggerBase *r = handlers(i);
+		if ((!(r->options & LoggerBase::Paused)) &&
+			((!blocked) || (r->options & LoggerBase::CannotBeBlocked)))
 		{
-			r->handle(o, m, bl, w);
-			if (!(r->options & MessageHandlerBase::DontBlock)) blocked = 1;
+			r->handle(o, m, w, bl);
+			if (!(r->options & LoggerBase::DontBlock)) blocked = 1;
 		}
 	}
 }
 
-int MessageHandlerManager::add(MessageHandlerBase *h)
+int LoggerManager::add(LoggerBase *h)
 {
 	h->manager = this;
@@ -36,12 +36,12 @@
 }
 
-void MessageHandlerManager::remove(int i)
+void LoggerManager::remove(int i)
 {
-	MessageHandlerBase *h = handlers(i);
+	LoggerBase *h = handlers(i);
 	h->manager = NULL;
 	handlers.remove(i);
 }
 
-void MessageHandlerManager::remove(MessageHandlerBase *h)
+void LoggerManager::remove(LoggerBase *h)
 {
 	int i;
@@ -50,5 +50,5 @@
 }
 
-void MessageHandlerManager::removeAll()
+void LoggerManager::removeAll()
 {
 	while (handlers.size() > 0)
@@ -58,12 +58,12 @@
 //////////////////////////////////
 
-void MessageHandlerBase::send(const char *o, const char *m, const char *bl, int w)
+void LoggerBase::send(const char *o, const char *m, int w, const char *bl)
 {
 	if (!isEnabled()) return;
 	int level = manager->find(this);
-	if (level >= 0) manager->send(level - 1, o, m, bl, w);
+	if (level >= 0) manager->send(level - 1, o, m, w, bl);
 }
 
-void MessageHandlerBase::Hprintf(const char *o, const char *m, int w, const char *bl, ...)
+void LoggerBase::logPrintf(const char *o, const char *m, int w, const char *bl, ...)
 {
 	if (!isEnabled()) return;
@@ -73,9 +73,9 @@
 	buf = ssprintf_va(bl, argptr);
 	va_end(argptr);
-	send(o, m, buf.c_str(), w);
+	send(o, m, w, buf.c_str());
 }
 
 
-void MessageHandlerBase::enable()
+void LoggerBase::enable()
 {
 	if (isEnabled()) return;
@@ -83,5 +83,5 @@
 }
 
-void MessageHandlerBase::disable()
+void LoggerBase::disable()
 {
 	if (!isEnabled()) return;
@@ -89,5 +89,5 @@
 }
 
-void MessageHandlerBase::pause()
+void LoggerBase::pause()
 {
 	if (isPaused()) return;
@@ -95,5 +95,5 @@
 }
 
-void MessageHandlerBase::resume()
+void LoggerBase::resume()
 {
 	if (!isPaused()) return;
@@ -103,10 +103,10 @@
 /////////////////////////////////
 
-void MessageHandlerToMemory::handle(const char *o, const char *m, const char *bl, int w)
+void LoggerToMemory::handle(const char *o, const char *m, int w, const char *bl)
 {
 	if (w > maxlevel) maxlevel = w;
-	if (w >= HMLV_INFO) infocount++;
-	if (w >= HMLV_WARN) warncount++;
-	if (w >= HMLV_ERROR) errcount++;
+	if (w >= LOG_INFO) infocount++;
+	if (w >= LOG_WARN) warncount++;
+	if (w >= LOG_ERROR) errcount++;
 
 	if (w >= minleveltostore)
@@ -118,6 +118,5 @@
 			{
 				if (msgs.len() > 0) msgs += '\n';
-				msgs += o; msgs += "::"; msgs += m;
-				msgs += " - "; msgs += bl;
+				msgs += SString::sprintf(LOG_FORMAT,LOG_LEVEL[w+1],o,m,bl);
 			}
 		}
