Index: cpp/frams/loggers/loggers.cpp
===================================================================
--- cpp/frams/loggers/loggers.cpp	(revision 375)
+++ cpp/frams/loggers/loggers.cpp	(revision 378)
@@ -6,72 +6,72 @@
 #include <common/stl-util.h>
 
-void _logMessageSingleLine(const char *o, const char *m, int w, const char *txt)
+void _logMessageSingleLine(const char *obj, const char *method, int level, const char *msg)
 {
-	tlsGetRef(message_handler_manager_instance).send(o, m, w, txt);
+	tlsGetRef(message_handler_manager_instance).send(obj, method, level, msg);
 }
 
 THREAD_LOCAL_DEF(LoggerManager, message_handler_manager_instance);
 
-void LoggerManager::send(int level, const char *o, const char *m, int w, const char *bl)
+void LoggerManager::send(int position, const char *obj, const char *method, int level, const char *msg)
 {
-	if (level >= handlers.size()) level = handlers.size() - 1;
-	bool blocked = 0;
-	for (int i = level; i >= 0; i--)
+	if (position >= (int)loggers.size()) position = loggers.size() - 1;
+	bool blocked = false;
+	for (int i = position; i >= 0; i--)
 	{
-		LoggerBase *r = handlers(i);
-		if ((!(r->options & LoggerBase::Paused)) &&
-			((!blocked) || (r->options & LoggerBase::CannotBeBlocked)))
+		LoggerBase *logger = loggers[i];
+		if ((!(logger->options & LoggerBase::Paused)) &&
+			((!blocked) || (logger->options & LoggerBase::CannotBeBlocked)))
 		{
-			r->handle(o, m, w, bl);
-			if (!(r->options & LoggerBase::DontBlock)) blocked = 1;
+			logger->handle(obj, method, level, msg);
+			if (!(logger->options & LoggerBase::DontBlock)) blocked = true;
 		}
 	}
 }
 
-int LoggerManager::add(LoggerBase *h)
+int LoggerManager::add(LoggerBase *logger)
 {
-	h->manager = this;
-	handlers += h;
-	return handlers.size() - 1;
+	logger->manager = this;
+	loggers.push_back(logger);
+	return loggers.size() - 1;
 }
 
 void LoggerManager::remove(int i)
 {
-	LoggerBase *h = handlers(i);
+	LoggerBase *h = loggers[i];
 	h->manager = NULL;
-	handlers.remove(i);
+	loggers.erase(loggers.begin() + i);
 }
 
-void LoggerManager::remove(LoggerBase *h)
+void LoggerManager::remove(LoggerBase *logger)
 {
-	int i;
-	if ((i = handlers.find(h)) < 0) return;
-	remove(i);
+	int index = find(logger);
+	if (index >= 0)
+		remove(index);
 }
 
 void LoggerManager::removeAll()
 {
-	while (handlers.size() > 0)
-		remove(handlers.size() - 1);
+	while (loggers.size() > 0)
+		remove(loggers.size() - 1);
 }
 
 //////////////////////////////////
 
-void LoggerBase::send(const char *o, const char *m, int w, const char *bl)
+void LoggerBase::send(const char *obj, const char *method, int level, const char *msg)
 {
 	if (!isEnabled()) return;
-	int level = manager->find(this);
-	if (level >= 0) manager->send(level - 1, o, m, w, bl);
+	int position = manager->find(this);
+	if (position >= 0) manager->send(position - 1, obj, method, level, msg);
 }
 
-void LoggerBase::logPrintf(const char *o, const char *m, int w, const char *bl, ...)
+void LoggerBase::logPrintf(const char *obj, const char *method, int level, const char *msg, ...)
 {
 	if (!isEnabled()) return;
 	string buf;
 	va_list argptr;
-	va_start(argptr, bl);
-	buf = ssprintf_va(bl, argptr);
+	va_start(argptr, msg);
+	buf = ssprintf_va(msg, argptr);
 	va_end(argptr);
-	send(o, m, w, buf.c_str());
+	send(obj, method, level, buf.c_str());
 }
 
@@ -103,20 +103,20 @@
 /////////////////////////////////
 
-void LoggerToMemory::handle(const char *o, const char *m, int w, const char *bl)
+void LoggerToMemory::handle(const char *obj, const char *method, int level, const char *msg)
 {
-	if (w > maxlevel) maxlevel = w;
-	if (w >= LOG_INFO) infocount++;
-	if (w >= LOG_WARN) warncount++;
-	if (w >= LOG_ERROR) errcount++;
+	if (level > maxlevel) maxlevel = level;
+	if (level >= LOG_INFO) infocount++;
+	if (level >= LOG_WARN) warncount++;
+	if (level >= LOG_ERROR) errcount++;
 
-	if (w >= minleveltostore)
+	if (level >= minleveltostore)
 	{
 		storedcount++;
 		if (options & (StoreFirstMessage | StoreAllMessages))
 		{
-			if (!((options&StoreFirstMessage) && (msgs.len() > 0)))
+			if (!((options&StoreFirstMessage) && (msgs.length() > 0)))
 			{
-				if (msgs.len() > 0) msgs += '\n';
-				msgs += SString::sprintf(LOG_FORMAT,LOG_LEVEL[w+1],o,m,bl);
+				if (msgs.length() > 0) msgs += '\n';
+				msgs += ssprintf(LOG_FORMAT, LOG_LEVEL[level + 1], obj, method, msg);
 			}
 		}
