Merge branch 'logmanager_stdout' into develop

This commit is contained in:
Markus Makela
2015-05-04 11:03:24 +03:00
6 changed files with 164 additions and 128 deletions

View File

@ -33,7 +33,7 @@
#include <log_manager.h>
int main(int argc, char **argv)
{
int arg_count = 3;
int arg_count = 4;
char *home;
char** arg_vector;
@ -44,7 +44,7 @@ int main(int argc, char **argv)
exit(1);
}
arg_vector = malloc(sizeof(char*)*4);
arg_vector = malloc(sizeof(char*)*5);
if(arg_vector == NULL)
{
@ -64,8 +64,8 @@ int main(int argc, char **argv)
{
arg_vector[2] = strdup("/usr/local/mariadb-maxscale/log");
}
arg_vector[3] = NULL;
arg_vector[3] = "-o";
arg_vector[4] = NULL;
skygw_logmanager_init(arg_count,arg_vector);
skygw_log_enable(LOGFILE_TRACE);
skygw_log_enable(LOGFILE_DEBUG);

View File

@ -41,7 +41,7 @@ int
main(int argc, char **argv)
{
char *enc, *pw;
int arg_count = 3;
int arg_count = 4;
char *home;
char** arg_vector;
@ -52,7 +52,7 @@ main(int argc, char **argv)
exit(1);
}
arg_vector = malloc(sizeof(char*)*4);
arg_vector = malloc(sizeof(char*)*5);
if(arg_vector == NULL)
{
@ -73,7 +73,8 @@ main(int argc, char **argv)
arg_vector[2] = strdup("/usr/local/mariadb-maxscale/log");
}
arg_vector[3] = NULL;
arg_vector[3] = "-o";
arg_vector[4] = NULL;
skygw_logmanager_init(arg_count,arg_vector);
skygw_log_enable(LOGFILE_TRACE);
skygw_log_enable(LOGFILE_DEBUG);

View File

@ -2225,15 +2225,11 @@ int main(int argc, char** argv)
}
printf("Log files written to: %s\n",home?home:"/tpm");
int argc_ = 11;
int argc_ = 2;
char* argv_[] =
{
"log_manager",
"-j",home?home:"/tmp",
"-a","ruleparser_debug",
"-c","ruleparser_trace",
"-e","ruleparser_message",
"-g","ruleparser_error",
"-o",
NULL
};