Logging target must be explicitly defined.
Whether the log-file should be written to the filesystem or to shared memory must now be explicitly defined when calling skygw_logmanager_init() (instead of passing that via the argc/argv construct). Also, the meaning of '-l' when invoking maxscale has been changed. Earlier -l [file|shm] specified whether the trace and debug logs should be written to shared memory (while the error and message logs always were written to the filesystem) and the _default_ was to write them to shared memory. Now, with only one file, '-l' has still the same meaning, but it decides whether the one and only logfile should be written to shared memory, or the filesystem and the _default_ is to write it to the filesystem.
This commit is contained in:
@ -18,7 +18,7 @@ int harness_init(int argc, char** argv, HARNESS_INSTANCE** inst){
|
||||
char** optstr;
|
||||
|
||||
if(!(argc == 2 && strcmp(argv[1],"-h") == 0)){
|
||||
skygw_logmanager_init(NULL,0,NULL);
|
||||
skygw_logmanager_init(NULL,LOG_TARGET_DEFAULT,0,NULL);
|
||||
}
|
||||
|
||||
if(!(instance.head = calloc(1,sizeof(FILTERCHAIN))))
|
||||
@ -55,7 +55,7 @@ int harness_init(int argc, char** argv, HARNESS_INSTANCE** inst){
|
||||
optstr = (char**)malloc(sizeof(char*)*2);
|
||||
optstr[0] = strdup("log_manager");
|
||||
optstr[1] = NULL;
|
||||
skygw_logmanager_init(tmp, 1, optstr);
|
||||
skygw_logmanager_init(tmp, LOG_TARGET_DEFAULT, 1, optstr);
|
||||
free(optstr);
|
||||
|
||||
rval = process_opts(argc,argv);
|
||||
|
@ -136,7 +136,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
arg_vector[0] = "logmanager";
|
||||
arg_vector[1] = NULL;
|
||||
skygw_logmanager_init(NULL, arg_count, arg_vector);
|
||||
skygw_logmanager_init(NULL, LOG_TARGET_DEFAULT, arg_count, arg_vector);
|
||||
|
||||
skygw_log_set_augmentation(0);
|
||||
|
||||
|
@ -101,7 +101,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
arg_vector[0] = "logmanager";
|
||||
arg_vector[1] = NULL;
|
||||
skygw_logmanager_init(NULL, arg_count,arg_vector);
|
||||
skygw_logmanager_init(NULL, LOG_TARGET_DEFAULT, arg_count,arg_vector);
|
||||
free(arg_vector);
|
||||
|
||||
skygw_log_disable(LOGFILE_DEBUG);
|
||||
|
Reference in New Issue
Block a user