Log: skygw_logmanager_init renamed to mxs_log_init.

skygw_logmanager_init renamed to mxs_log_init and skygw_logmanager_done
renamed to mxs_log_finish. skygw_logmanager_exit removed alltogether as
all it did was to call skygw_logmanager_done. That appears to have been
a source for confusion as in many places a call to skygw_logmanager_done
was followed by a call to skygw_logmanager_exit. In addition, the function
skygw_log_done was removed from the header, since it lacked an
implementation.
This commit is contained in:
Johan Wikman
2015-11-12 10:15:50 +02:00
parent 680345d374
commit c7a329e43e
14 changed files with 65 additions and 84 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);

View File

@ -17,7 +17,7 @@ int harness_init(int argc, char** argv, HARNESS_INSTANCE** inst){
char tmp[2048];
if(!(argc == 2 && strcmp(argv[1],"-h") == 0)){
skygw_logmanager_init(NULL,NULL,LOG_TARGET_DEFAULT);
mxs_log_init(NULL,NULL,LOG_TARGET_DEFAULT);
}
if(!(instance.head = calloc(1,sizeof(FILTERCHAIN))))
@ -51,7 +51,7 @@ int harness_init(int argc, char** argv, HARNESS_INSTANCE** inst){
getcwd(cwd,sizeof(cwd));
sprintf(tmp,"%s",cwd);
skygw_logmanager_init(NULL, tmp, LOG_TARGET_DEFAULT);
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;
}

View File

@ -124,7 +124,7 @@ int main(int argc, char **argv) {
num_args = optind;
skygw_logmanager_init(NULL, NULL, LOG_TARGET_DEFAULT);
mxs_log_init(NULL, NULL, LOG_TARGET_DEFAULT);
skygw_log_set_augmentation(0);
@ -138,7 +138,7 @@ int main(int argc, char **argv) {
"Error: Memory allocation failed for ROUTER_INSTANCE")));
skygw_log_sync_all();
skygw_logmanager_done();
mxs_log_finish();
return 1;
}
@ -162,7 +162,7 @@ int main(int argc, char **argv) {
path, strerror(errno))));
skygw_log_sync_all();
skygw_logmanager_done();
mxs_log_finish();
free(inst);
@ -200,7 +200,7 @@ int main(int argc, char **argv) {
"Check retcode: %i, Binlog Pos = %llu", ret, inst->binlog_position)));
skygw_log_sync_all();
skygw_logmanager_done();
mxs_log_finish();
free(inst);

View File

@ -89,7 +89,7 @@ int main(int argc, char **argv) {
roptions = strdup("server-id=3,heartbeat=200,binlogdir=/not_exists/my_dir,transaction_safety=1,master_version=5.6.99-common,master_hostname=common_server,master_uuid=xxx-fff-cccc-fff,master-id=999");
skygw_logmanager_init(NULL, NULL, LOG_TARGET_DEFAULT);
mxs_log_init(NULL, NULL, LOG_TARGET_DEFAULT);
skygw_log_disable(LOGFILE_DEBUG);
skygw_log_disable(LOGFILE_TRACE);
@ -128,7 +128,7 @@ int main(int argc, char **argv) {
"Error: Memory allocation FAILED for ROUTER_INSTANCE")));
skygw_log_sync_all();
skygw_logmanager_done();
mxs_log_finish();
return 1;
}
@ -579,7 +579,7 @@ int main(int argc, char **argv) {
}
skygw_log_sync_all();
skygw_logmanager_done();
mxs_log_finish();
free(inst);