Made all sub systems for logging lower case

Log filtering is now based on an array of severitys per subsystem
Added a LogIS call which takes an integer for the subsystem
Added a LogTS call which allows to specify a user supplied time stamp
This commit is contained in:
2016-03-08 11:36:29 +01:00
parent 40382b2b8c
commit 5a388ab741
6 changed files with 347 additions and 152 deletions

View File

@ -81,7 +81,7 @@ int defaultPrepareTxn(pAsyncProtocol p, pAsyncTxn txn, const char *cmd,
/* outgoing command is correctly terminated */
txn->out_buf = malloc(cmd_len + 1);
if (txn->out_buf == NULL) {
Log(ERROR,"ASQUIO","%s","Out of memory in AsyncProtocol::defaultPrepareTxn");
Log(ERROR,"asquio","%s","Out of memory in AsyncProtocol::defaultPrepareTxn");
return 0;
}
memcpy(txn->out_buf, cmd, cmd_len + 1);
@ -90,7 +90,7 @@ int defaultPrepareTxn(pAsyncProtocol p, pAsyncTxn txn, const char *cmd,
int tlen = strlen(term);
txn->out_buf = malloc(cmd_len + tlen + 1);
if (txn->out_buf == NULL) {
Log(ERROR,"ASQUIO","%s","Out of memory in AsyncProtocol::defaultPrepareTxn",
Log(ERROR,"asquio","%s","Out of memory in AsyncProtocol::defaultPrepareTxn",
eError);
return 0;
}
@ -173,7 +173,7 @@ static char *decodeTerminator(char *code)
count = strlen(code);
pResult = (char *) malloc(count + 1);
if (!pResult) {
Log(ERROR,"ASQUIO","%s","Out of memory in AsyncProtocol::decodeTerminator",
Log(ERROR,"asquio","%s","Out of memory in AsyncProtocol::decodeTerminator",
eError);
return NULL;
}
@ -328,7 +328,7 @@ pAsyncProtocol AsyncProtocolCreate(SicsInterp * pSics,
self = (pAsyncProtocol) malloc(sizeof(AsyncProtocol));
if (self == NULL) {
Log(ERROR,"ASQUIO","%s","Out of memory in AsyncProtocolCreate");
Log(ERROR,"asquio","%s","Out of memory in AsyncProtocolCreate");
return NULL;
}
memset(self, 0, sizeof(AsyncProtocol));
@ -339,7 +339,7 @@ pAsyncProtocol AsyncProtocolCreate(SicsInterp * pSics,
pKFunc = AsyncProtocolKill;
iRet = AddCommand(pSics, (char *) protocolName, pFunc, pKFunc, self);
if (!iRet) {
Log(ERROR,"ASQUIO","%s","AddCommand failed in AsyncProtocolCreate");
Log(ERROR,"asquio","%s","AddCommand failed in AsyncProtocolCreate");
AsyncProtocolKill(self);
return NULL;
}