Merge branch 'develop' into MXS-329-develop-20151111

This commit is contained in:
Markus Makela
2015-11-13 07:44:23 +02:00
66 changed files with 4807 additions and 4056 deletions

View File

@ -2213,7 +2213,7 @@ int main(int argc, char** argv)
NULL
};
skygw_logmanager_init(argc_,argv_);
mxs_log_init(argc_,argv_);
init_test_env(home);
@ -2231,7 +2231,7 @@ int main(int argc, char** argv)
printf("Failed to parse rule. Read the error log for the reason of the failure.\n");
}
skygw_log_sync_all();
mxs_log_flush_sync();
return 0;
}

View File

@ -15,10 +15,9 @@ int harness_init(int argc, char** argv, HARNESS_INSTANCE** inst){
DCB* dcb;
char cwd[1024];
char tmp[2048];
char** optstr;
if(!(argc == 2 && strcmp(argv[1],"-h") == 0)){
skygw_logmanager_init(NULL,0,NULL);
mxs_log_init(NULL,NULL,LOG_TARGET_DEFAULT);
}
if(!(instance.head = calloc(1,sizeof(FILTERCHAIN))))
@ -52,11 +51,7 @@ int harness_init(int argc, char** argv, HARNESS_INSTANCE** inst){
getcwd(cwd,sizeof(cwd));
sprintf(tmp,"%s",cwd);
optstr = (char**)malloc(sizeof(char*)*2);
optstr[0] = strdup("log_manager");
optstr[1] = NULL;
skygw_logmanager_init(tmp, 1, optstr);
free(optstr);
mxs_log_init(NULL, tmp, LOG_TARGET_DEFAULT);
rval = process_opts(argc,argv);

View File

@ -11,8 +11,7 @@ int main(int argc, char** argv){
if(harness_init(argc,argv,&hinstance)){
printf("Error: Initialization failed.\n");
skygw_log_write(LOGFILE_ERROR,"Error: Initialization failed.\n");
skygw_logmanager_done();
skygw_logmanager_exit();
mxs_log_finish();
return 1;
}
@ -230,8 +229,7 @@ int main(int argc, char** argv){
free_buffers();
free_filters();
skygw_logmanager_done();
skygw_logmanager_exit();
mxs_log_finish();
free(instance.head);
return 0;

View File

@ -35,8 +35,7 @@ int main(int argc,char** argv)
if(harness_init(argc,argv,&inst) || inst->error){
printf("Error: Initialization failed.\n");
skygw_log_write(LOGFILE_ERROR,"Error: Initialization failed.\n");
skygw_logmanager_done();
skygw_logmanager_exit();
mxs_log_finish();
return 1;
}