This is the first working version of the new logging system. Some work
in fine tuning still needs to be done. But is reasonably OK now.
This commit is contained in:
13
network.c
13
network.c
@ -52,7 +52,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include "sics.h"
|
||||
#include "commandlog.h"
|
||||
#include "uselect.h"
|
||||
|
||||
#define PORT 1
|
||||
@ -69,10 +68,14 @@ struct timeval lastclose = { -1, 0 };
|
||||
*/
|
||||
static void NetError(const char pText[])
|
||||
{
|
||||
/*
|
||||
SICSLogWrite(pText,eError);
|
||||
*/
|
||||
WriteToCommandLog("NET>", pText);
|
||||
unsigned int severity = DEBUG;
|
||||
if(strstr(pText,"ERROR") != NULL){
|
||||
severity = ERROR;
|
||||
} else if(strstr(pText,"WARNING") != NULL){
|
||||
severity = WARN;
|
||||
}
|
||||
|
||||
Log(severity,"IO","%s", pText);
|
||||
}
|
||||
|
||||
/* ---------------------------- Local ------------------------------------
|
||||
|
Reference in New Issue
Block a user