Transmitter::Debug implementation 1/2
This also sorts switch() and listen_to() statements in order of severity: debug, info, warning, error, fatal, throw.
This commit is contained in:
@@ -67,15 +67,18 @@ protected:
|
||||
const char* prefix = "";
|
||||
|
||||
switch (chn) {
|
||||
case Transmitter::Error:
|
||||
prefix = "[ERROR]: ";
|
||||
break;
|
||||
case Transmitter::Debug:
|
||||
/* ignore */
|
||||
return;
|
||||
case Transmitter::Info:
|
||||
/* ignore */
|
||||
return;
|
||||
case Transmitter::Warning:
|
||||
prefix = "[WARNING]: ";
|
||||
break;
|
||||
case Transmitter::Error:
|
||||
prefix = "[ERROR]: ";
|
||||
break;
|
||||
case Transmitter::Fatal:
|
||||
prefix = "[FATAL]: ";
|
||||
break;
|
||||
@@ -150,10 +153,9 @@ init ()
|
||||
|
||||
static LuaReceiver lua_receiver;
|
||||
|
||||
lua_receiver.listen_to (error);
|
||||
lua_receiver.listen_to (info);
|
||||
lua_receiver.listen_to (fatal);
|
||||
lua_receiver.listen_to (warning);
|
||||
lua_receiver.listen_to (error);
|
||||
lua_receiver.listen_to (fatal);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user