Added a -h option to sicslog querying

Fixed the mongodb path in sicslogmain to point to the production server
This commit is contained in:
2016-04-14 14:57:55 +02:00
parent 1fb85ef6b5
commit 78f6b92960
4 changed files with 18 additions and 6 deletions

View File

@ -9,7 +9,7 @@
#include <bson.h>
#include <logv2.h>
static void formatSeverity(unsigned int severity, char *buffer, unsigned int bufferLength)
void formatSeverity(unsigned int severity, char *buffer, unsigned int bufferLength)
{
static const char *severityText[] = {"FATAL",
"ERROR",
@ -25,6 +25,7 @@ static void formatSeverity(unsigned int severity, char *buffer, unsigned int buf
}
strncpy(buffer,severityText[severity-1],bufferLength);
}
/*----------------------------------------------------------------------------------------*/
static void ResultPrint(const bson_t *doc, void *userData)
{
@ -55,7 +56,7 @@ int main(int argc, char *argv[])
int status;
char *error;
sicslogSetup("mongodb://logwriter:sinqsics@localhost:27017/?authSource=admin",NULL);
sicslogSetup("mongodb://logwriter:sinqsics@mpc1965:27017/?authSource=admin",NULL);
status = sicslogQuery(argc,argv,ResultPrint,NULL);
if(status != 0){
error = sicslogGetError();