diff --git a/source/ubl-settings-logging.c b/source/ubl-settings-logging.c index 5862f99..5889ccb 100644 --- a/source/ubl-settings-logging.c +++ b/source/ubl-settings-logging.c @@ -624,7 +624,11 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){ paths = yon_char_unite(paths,strcmp(paths,"") ? "," : "", cur_path,NULL); } if(!window->paths) - if (matched==path_amount) return; + if (matched==path_amount) { + yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(window->LogPathsTree)); + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),REPEATED_PATHS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + return; + } if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->RotationPeriodCheck))){ int active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo)); switch (active){ @@ -636,7 +640,7 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){ int weekday = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RotationPeriodAdditionalCombo)); weekday++; if (weekday==7) weekday=0; - period = yon_char_unite(period,", ",yon_char_from_int(weekday),NULL); + period = yon_char_unite(period," ",yon_char_from_int(weekday),NULL); break; case 3: period = "monthly"; break; @@ -776,22 +780,22 @@ void on_logrotate_save(GtkWidget *self, dictionary *dict){ if (!yon_char_is_empty(before_once)) { before_once = yon_char_replace(before_once,"\"","=--"); before_once = yon_char_replace(before_once,"=--","\\\""); - firstaction = yon_char_append("firstaction ",before_once); + firstaction = yon_char_append("firstaction,",before_once); } if (!yon_char_is_empty(after_once)) { after_once = yon_char_replace(after_once,"\"","=--"); after_once = yon_char_replace(after_once,"=--","\\\""); - lastaction = yon_char_append("lastaction ",after_once); + lastaction = yon_char_append("lastaction,",after_once); } if (!yon_char_is_empty(before)) { before = yon_char_replace(before,"\"","=--"); before = yon_char_replace(before,"=--","\\\""); - prerotate = yon_char_append("prerotate ",before); + prerotate = yon_char_append("prerotate,",before); } if (!yon_char_is_empty(after)) { after = yon_char_replace(after,"\"","=--"); after = yon_char_replace(after,"=--","\\\""); - postrotate = yon_char_append("postrotate ",after); + postrotate = yon_char_append("postrotate,",after); } if (!yon_char_is_empty(firstaction)||!yon_char_is_empty(after_once)||!yon_char_is_empty(before)||!yon_char_is_empty(after)) endscript = yon_char_append("endscript ",endwork); @@ -883,6 +887,7 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind window->CommandBeforeEntry=yon_gtk_builder_get_widget(builder,"CommandBeforeEntry"); window->CommandAfterEntry=yon_gtk_builder_get_widget(builder,"CommandAfterEntry"); window->EndworkCommandEntry=yon_gtk_builder_get_widget(builder,"EndworkCommandEntry"); + window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox"); gtk_window_set_title(GTK_WINDOW(window->MainWindow),TITLE_LABEL); if (dialog) gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(dialog->Window)); @@ -953,6 +958,8 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind g_signal_connect(G_OBJECT(window->EmailCombo),"changed",G_CALLBACK(on_combo_activate_first),window->EmailEntry); g_signal_connect(G_OBJECT(window->EmailCombo),"changed",G_CALLBACK(on_combo_activate_first),window->EmailContentsCombo); + g_signal_connect(G_OBJECT(window->RotationPeriodMainCombo),"changed",G_CALLBACK(on_combo_activate_second),window->RotationPeriodAdditionalCombo); + g_signal_connect(G_OBJECT(window->FileAmountButton),"clicked",G_CALLBACK(on_filechooser_open),window); g_signal_connect(G_OBJECT(window->CreateLogButton),"clicked",G_CALLBACK(on_rules_open),window->CreateLogEntry); @@ -986,10 +993,13 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind } else if (!strcmp(parsed[i],"daily")){ gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),1); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->RotationPeriodCheck),1); - }else if (!strcmp(parsed[i],"weekly")){ + }else if (strstr(parsed[i],"weekly")){ gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),2); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->RotationPeriodCheck),1); - gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodAdditionalCombo),atoi(parsed[i+1])); + int dayofweek = atoi(strstr(parsed[i]," ")+1); + if (dayofweek==0) dayofweek=7; + dayofweek--; + gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodAdditionalCombo),dayofweek); }else if (!strcmp(parsed[i],"monthly")){ gtk_combo_box_set_active(GTK_COMBO_BOX(window->RotationPeriodMainCombo),3); }else if (!strcmp(parsed[i],"yearly")){ @@ -1039,7 +1049,7 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind // }else if (strstr(parsed[i],"size")){ int sizemod = yon_size_get_int_from_letter(parsed[i][strlen(parsed[i])-1]); - gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->JournalMaxSizeSpin),atol(parsed[i])); + gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->JournalMaxSizeSpin),atol(strstr(parsed[i], " ")+1)); gtk_combo_box_set_active(GTK_COMBO_BOX(window->JournalMaxSizeCombo),sizemod); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->JournalMaxSizeCheck),1); }else if (!strcmp(parsed[i],"copytruncate")){ @@ -1111,6 +1121,7 @@ logrotate_configure_window *yon_logrotate_window_new(char *paths, logrotate_wind void on_logrotate_add(GtkWidget *self, logrotate_window *dialog){ logrotate_configure_window *window = yon_logrotate_window_new(NULL,NULL); gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->MainTree))); + gtk_window_set_transient_for(GTK_WINDOW(window->MainWindow),GTK_WINDOW(dialog->Window)); gtk_widget_show(window->MainWindow); gtk_widget_set_sensitive(window->LogNameEntry,1); gtk_widget_set_sensitive(window->LogDescriptionEntry,1); @@ -1134,7 +1145,7 @@ void on_logrotate_edit(GtkWidget *self, logrotate_window *window){ logrotate_configure_window *dialog = yon_logrotate_window_new(paths,window); gtk_widget_show(dialog->MainWindow); gtk_tree_model_get(model,&iter,0,&name,1,&paths,2,&description,-1); - gtk_entry_set_text(GTK_ENTRY(dialog->LogNameEntry),name); + gtk_entry_set_text(GTK_ENTRY(dialog->LogNameEntry),name ? name : ""); gtk_entry_set_text(GTK_ENTRY(dialog->LogDescriptionEntry),description ? description : ""); gtk_widget_set_can_focus(dialog->LogNameEntry,0); // gtk_widget_set_can_focus(dialog->LogDescriptionEntry,0); @@ -1229,7 +1240,7 @@ void on_logrotate_tab_selection_changed(GtkWidget *self, logrotate_window *windo gtk_widget_set_sensitive(window->RemoveButton,1); gtk_widget_set_sensitive(window->ConfigureButton,1); } else { - gtk_widget_set_sensitive(window->AddButton,0); + gtk_widget_set_sensitive(window->AddButton,1); gtk_widget_set_sensitive(window->RemoveButton,0); gtk_widget_set_sensitive(window->ConfigureButton,0); } @@ -1691,7 +1702,8 @@ void on_log_edit(GtkWidget *self,main_window *widgets){ char *paths; int size; char *description; - gtk_tree_model_get(model,&iter,0,&name,1,&paths,2,&description,-1); + int protect; + gtk_tree_model_get(model,&iter,0,&name,1,&paths,2,&description,4,&protect,-1); gtk_entry_set_text(GTK_ENTRY(window->NameEntry),name); gtk_entry_set_has_frame(GTK_ENTRY(window->NameEntry),0); gtk_widget_set_sensitive(window->NameEntry,0); @@ -1702,6 +1714,10 @@ void on_log_edit(GtkWidget *self,main_window *widgets){ gtk_widget_hide(window->LogrotateButton); gtk_widget_hide(window->MetalogButton); gtk_widget_hide(window->SyslogButton); + gtk_widget_show(window->StatisticsFrame); + int sz; + config_str logsize = yon_config_load(journald_size_command,&sz); + gtk_label_set_text(GTK_LABEL(window->LogSizeLabel),logsize[0]); g_signal_connect(G_OBJECT(window->JournaldButton),"clicked", G_CALLBACK(on_journald_open),widgets); } else { gtk_widget_hide(window->JournaldButton); @@ -1716,6 +1732,7 @@ void on_log_edit(GtkWidget *self,main_window *widgets){ gtk_entry_set_text(GTK_ENTRY(window->LogDescriptionEntry),description ? description : ""); config_str paths_parsed = yon_char_parse(paths,&size,"\n"); GtkWidget *last=NULL; + int protected=0; for (int i=0;iLogPathsBox),box,0,0,5); last = AppendButton; } + if (strcmp(name,"journald")) gtk_widget_show(last); g_signal_connect(G_OBJECT(last),"clicked",G_CALLBACK(on_log_path_append),window); gtk_widget_set_sensitive(window->LogTypeCombo,0); @@ -1765,8 +1791,13 @@ void on_main_window_tree_selection_changed(GtkWidget *self,main_window *widgets) GtkTreeModel *model = GTK_TREE_MODEL(widgets->list); GtkTreeIter iter; if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MainTree)),&model,&iter)){ + gboolean is_standard; + gtk_tree_model_get(model,&iter,3,&is_standard,-1); gtk_widget_set_sensitive(widgets->AddButton,1); - gtk_widget_set_sensitive(widgets->RemoveButton,1); + if (!is_standard) + gtk_widget_set_sensitive(widgets->RemoveButton,1); + else + gtk_widget_set_sensitive(widgets->RemoveButton,0); gtk_widget_set_sensitive(widgets->InspectButton,1); gtk_widget_set_sensitive(widgets->ConfigureButton,1); } else { @@ -1957,11 +1988,13 @@ main_window *setup_window(){ config_str journals = yon_file_open(journals_list_path,&size); for (int i=1;ilist,&iter); - gtk_list_store_set(widgets->list,&iter,0,log[0],1,log[1],2,_(log[2]),3,-1,4,-1,5,-1,6,-1,7,-1,-1); + free(yon_char_parse(log[1],&psize,"\n")); + gtk_list_store_set(widgets->list,&iter,0,log[0],1,log[1],2,_(log[2]),3,1,4,psize,-1); } config_str services = yon_file_open(services_list_path,&service_size); for (int i=1;icontaining_type = val_type; yon_dictionary_add_or_create_if_exists_with_data(__yon_main_window_config.custom_parameters,param->parameter_name,param); dictionary *dict=NULL; + if (__yon_main_window_config.deleted_parameters) for_dictionaries(dict,__yon_main_window_config.deleted_parameters){ if (strcmp(dict->key,param->parameter_name)) yon_dictionary_rip(dict); @@ -2081,6 +2082,81 @@ void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type){ _yon_ubl_status_box_render(text,type); } +void _yon_ubl_status_highlight_incorrect(GtkWidget *widget){ + gtk_style_context_add_class(gtk_widget_get_style_context(widget),"errorBox"); + sleep(5); + gtk_style_context_remove_class(gtk_widget_get_style_context(widget),"errorBox"); +} + +void yon_ubl_status_highlight_incorrect(GtkWidget *widget){ + GThread *thread = g_thread_new(NULL,(GThreadFunc)_yon_ubl_status_highlight_incorrect,widget); +} + +struct temp_statusbox { + int times; + GtkWidget *revealer; + }; + +void _yon_ubl_status_box_timed_remove(struct temp_statusbox *statusstruct){ + sleep(statusstruct->times); + if (statusstruct->revealer){ + gtk_revealer_set_reveal_child(GTK_REVEALER(statusstruct->revealer),0); + sleep(1); + gtk_widget_destroy(statusstruct->revealer); + } +} + +void yon_ubl_status_box_spawn(GtkContainer *container,char *display_text, int timeout,BACKGROUND_IMAGE_TYPE type){ + GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); + GtkWidget *revealer = gtk_revealer_new(); + GtkWidget *label = gtk_label_new(""); + GtkWidget *icon = gtk_image_new(); + gtk_container_add(GTK_CONTAINER(revealer),box); + gtk_box_pack_start(GTK_BOX(box),icon,0,0,5); + gtk_box_pack_start(GTK_BOX(box),label,0,0,5); + gtk_container_add(container,revealer); + + gtk_widget_show_all(revealer); + gtk_revealer_set_reveal_child(GTK_REVEALER(revealer),1); + + gtk_widget_set_margin_bottom(label,9); + gtk_widget_set_margin_top(label,9); + gtk_label_set_xalign(GTK_LABEL(label),0.0); + PangoAttrList *attributes = pango_attr_list_new(); + PangoAttribute *boldAttr = pango_attr_weight_new(PANGO_WEIGHT_BOLD); + pango_attr_list_insert(attributes, boldAttr); + gtk_label_set_attributes(GTK_LABEL(label),attributes); + + GdkRGBA textColor; + gdk_rgba_parse(&textColor, "#4d4d4d4d4d4d"); + PangoAttribute *colorAttr = pango_attr_foreground_new( + (int)(textColor.red * 65535), + (int)(textColor.green * 65535), + (int)(textColor.blue * 65535) + ); + pango_attr_list_insert(attributes, colorAttr); + + GtkIconTheme *ictheme = gtk_icon_theme_get_default(); + if (type == BACKGROUND_IMAGE_SUCCESS_TYPE||! type) + { + gtk_style_context_remove_class(gtk_widget_get_style_context(box), "boxInfoMessError"); + gtk_style_context_add_class(gtk_widget_get_style_context(box), "boxInfoMessOK"); + gtk_image_set_from_pixbuf(GTK_IMAGE(icon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-logging.checked", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, NULL)); + } + else if (type == BACKGROUND_IMAGE_FAIL_TYPE) + { + gtk_style_context_remove_class(gtk_widget_get_style_context(box), "boxInfoMessOK"); + gtk_style_context_add_class(gtk_widget_get_style_context(box), "boxInfoMessError"); + gtk_image_set_from_pixbuf(GTK_IMAGE(icon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-logging.warning", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, NULL)); + } + if (display_text) + gtk_label_set_text(GTK_LABEL(label),display_text); + struct temp_statusbox *statusstruct = malloc(sizeof(struct temp_statusbox)); + statusstruct->revealer = revealer; + statusstruct->times = timeout; + GThread *thread = g_thread_new(NULL,(GThreadFunc)_yon_ubl_status_box_timed_remove,statusstruct); +} + /**yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id) * [EN] * Set up plugs for using with GtkSockets insine ubl-settings-manager. diff --git a/source/ubl-utils.h b/source/ubl-utils.h index a76516e..7ddc5c0 100644 --- a/source/ubl-utils.h +++ b/source/ubl-utils.h @@ -352,6 +352,10 @@ int yon_ubl_status_box_setup(GtkWidget *icon, GtkWidget *box, GtkWidget *label); */ void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type); +void yon_ubl_status_highlight_incorrect(GtkWidget *widget); + +void yon_ubl_status_box_spawn(GtkContainer *container,char *display_text, int timeout,BACKGROUND_IMAGE_TYPE type); + #ifdef __cplusplus /**yon_ubl_header_setup(overlay, head, image, imag_path) diff --git a/ubl-settings-logging-add.glade b/ubl-settings-logging-add.glade index c6bd6c1..27a9496 100644 --- a/ubl-settings-logging-add.glade +++ b/ubl-settings-logging-add.glade @@ -50,7 +50,6 @@ 450 - 550 False True com.ublinux.ubl-settings-logging @@ -186,6 +185,7 @@ True never in + 150 True diff --git a/ubl-settings-logging-journald.glade b/ubl-settings-logging-journald.glade index 589b71a..c48b5f4 100644 --- a/ubl-settings-logging-journald.glade +++ b/ubl-settings-logging-journald.glade @@ -84,6 +84,7 @@ 600 False True + com.ublinux.ubl-settings-logging True diff --git a/ubl-settings-logging-logrotate-table.glade b/ubl-settings-logging-logrotate-table.glade index e045a71..e07caf1 100644 --- a/ubl-settings-logging-logrotate-table.glade +++ b/ubl-settings-logging-logrotate-table.glade @@ -88,7 +88,6 @@ True - False True True image5 diff --git a/ubl-settings-logging-logrotate.glade b/ubl-settings-logging-logrotate.glade index 754e6ad..2b13c77 100644 --- a/ubl-settings-logging-logrotate.glade +++ b/ubl-settings-logging-logrotate.glade @@ -104,31 +104,45 @@ True False - 5 - 5 - 5 - 5 vertical - 5 - + True - True - in + False + vertical + + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + vertical + 5 - + True - False - 5 - 5 - 5 - 5 + True + in - + True False - vertical - 5 + 5 + 5 + 5 + 5 True @@ -139,13 +153,38 @@ True False + vertical 5 - + True False - Log/Journal: - 0 + 5 + + + True + False + Log/Journal: + 0 + + + False + True + 0 + + + + + True + False + True + + + True + True + 1 + + False @@ -154,93 +193,113 @@ - - True - False - True - - - True - True - 1 - - - - - False - True - 0 - - - - - True - False - 5 - - + True False - Description: - 0 + 5 + + + True + False + Description: + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + False True - 0 - - - - - True - True - - - True - True 1 - - - False - True - 1 - - - - - True - False - 0.019999999552965164 - in - + True False - 5 - 5 - 5 + 0.019999999552965164 + in - + True False - 5 + 5 + 5 + 5 True False - vertical 5 - + True - True - True - image3 - + False + vertical + 5 + + + True + True + True + image3 + + + + False + True + 0 + + + + + True + True + True + image7 + + + + False + True + 1 + + + + + True + True + True + image6 + + + + False + True + 2 + + False @@ -249,140 +308,147 @@ - - True - True - True - image7 - - - - False - True - 1 - - - - - True - True - True - image6 - - - - False - True - 2 - - - - - False - True - 0 - - - - - True - True - in - - + True True - liststore1 - False - - - + in - - Path + + True + True + liststore1 + False - - - 0 - + + Path + + + + 0 + + + + + True + True + 1 + - - True - True - 1 - + + + True + False + Paths to log and journals files + + - - - - True - False - Paths to log and journals files - + + False + True + 2 + False True - 2 + 0 - - - False - True - 0 - - - - - True - False - vertical - 5 - + True False - 0.019999999552965164 - in + vertical + 5 - + True False - 5 - 5 - 5 + 0.019999999552965164 + in - + True False - vertical - 5 + 5 + 5 + 5 True False + vertical 5 - - Rotation period: + True - True - False - True + False + 5 + + + Rotation period: + True + True + False + True + + + False + True + 0 + + + + + True + False + False + 0 + + Hourly + Daily + Weekly* + Monthly + Yearly + + + + False + True + 1 + + + + + True + False + False + 0 + + Monday + Tuesday + Wednesday + Thursday + Friday + Saturday + Sunday* + + + + False + True + 2 + + False @@ -391,18 +457,55 @@ - + True - False False - 0 - - Hourly - Daily - Weekly* - Monthly - Yearly - + 5 + + + Maximum size of file: + True + True + False + True + + + False + True + 0 + + + + + True + False + True + adjustment4 + + + False + True + 1 + + + + + True + False + False + 0 + + Kb + Mb + Gb + + + + False + True + 2 + + False @@ -410,47 +513,131 @@ 1 - - - True - False - False - 0 - - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday* - - - - False - True - 2 - - - - False - True - 0 - + + + + + True + False + Checking frequency configuration + + + + + False + True + 0 + + + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 True False + vertical 5 - - Maximum size of file: + True - True - False - True + False + 5 + + + File amount: + True + True + False + True + + + False + True + 0 + + + + + True + False + True + adjustment6 + + + False + True + 1 + + + + + True + False + Store at: + + + False + True + 2 + + + + + True + False + False + 0 + + Default + Same directory + Separate directory + + + + False + True + 3 + + + + + True + False + True + + + False + True + 4 + + + + + True + False + True + True + image4 + + + False + True + 5 + + False @@ -459,92 +646,142 @@ - - True - False - True - adjustment4 - - - False - True - 1 - - - - + True - False False - 0 - - Kb - Mb - Gb - + 5 + + + True + False + Rotation as user: + + + False + True + 0 + + + + + True + False + 0 + + root* + + + + False + True + 1 + + + + + True + False + Rotation as group: + + + False + True + 2 + + + + + True + False + 0 + + root* + + + + False + True + 3 + + False True - 2 + 1 - - False - True - 1 - + + + True + False + Rotation configuration + + + + False + True + 1 + - - - True - False - Checking frequency configuration - - - - - False - True - 0 - - - - - True - False - 0.019999999552965164 - in - + True False - 5 - 5 - 5 + 0.019999999552965164 + in - + True False - vertical - 5 + 5 + 5 + 5 True False + vertical 5 - - File amount: + True - True - False - True + False + 5 + + + True + False + Error processing: + + + False + True + 0 + + + + + True + False + 0 + + Default + Output errors if log file does not exist* + Do not output errors if log file does not exist + + + + False + True + 1 + + False @@ -553,11 +790,39 @@ - + True - False - True - adjustment6 + False + 5 + + + True + False + Rotation of jurnal even when it is empty: + + + False + True + 0 + + + + + True + False + 0 + + Default + On + Off + + + + False + True + 1 + + False @@ -566,10 +831,49 @@ - + True False - Store at: + 5 + + + Do not rotate journal younger than + True + True + False + True + + + False + True + 0 + + + + + True + False + True + adjustment7 + + + False + True + 1 + + + + + True + False + days + + + False + True + 2 + + False @@ -578,16 +882,49 @@ - + True - False False - 0 - - Default - Same directory - Separate directory - + 5 + + + Delete rotated journals older than + True + True + False + True + + + False + True + 0 + + + + + True + False + True + adjustment5 + + + False + True + 1 + + + + + True + False + days + + + False + True + 2 + + False @@ -596,10 +933,68 @@ - + True - False - True + False + 5 + + + Rotate journals if size more than + True + True + False + True + + + False + True + 0 + + + + + True + False + True + adjustment8 + + + False + True + 1 + + + + + True + False + False + 0 + + Kb + Mb + Gb + + + + False + True + 2 + + + + + True + False + but not earlier than the specified time interval + True + + + False + True + 3 + + False @@ -608,12 +1003,68 @@ - + True - False - True - True - image4 + False + 5 + + + Rotate journals if size more than + True + True + False + True + + + False + True + 0 + + + + + True + False + True + adjustment9 + + + False + True + 1 + + + + + True + False + False + 0 + + Kb + Mb + Gb + + + + False + True + 2 + + + + + True + False + before specified time interval + True + + + False + True + 3 + + False @@ -622,22 +1073,171 @@ - - False - True - 0 - + + + + + True + False + File choosing configuration + + + + + False + True + 2 + + + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 True False + vertical 5 - + True False - Rotation as user: + 5 + + + True + False + Create log + + + False + True + 0 + + + + + True + False + 0 + + Default + Do not output + Output errors + Off + + + + False + True + 1 + + + + + True + False + as user: + + + False + True + 2 + + + + + True + False + False + 0 + + Default + + + + False + True + 3 + + + + + True + False + as group: + + + False + True + 4 + + + + + True + False + False + 0 + + Default + + + + False + True + 5 + + + + + True + False + rules: + + + False + True + 6 + + + + + True + False + True + + + False + True + 7 + + + + + True + False + True + True + image5 + + + False + True + 8 + + False @@ -646,13 +1246,24 @@ - + True False - 0 - - root* - + 5 + + + Cut source journal fileafter copy creating instead of moving old journal file and creating new one + True + True + False + True + + + False + True + 0 + + False @@ -660,940 +1271,197 @@ 1 + + + + + + + True + False + Files and directories configuration + + + + + False + True + 3 + + + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + + + True + False + vertical + 5 - - True - False - Rotation as group: - - - False - True - 2 - - - - + True False - 0 - - root* - + 5 + + + True + False + Use compression: + + + False + True + 0 + + + + + True + False + 0 + + Default + On + Off + + + + False + True + 1 + + + + + True + False + Delay compression by one journal in queue: + + + False + True + 2 + + + + + True + False + False + 0 + + Default + Yes + No + + + + False + True + 3 + + False True - 3 + 0 - - False - True - 1 - - - - - - - - - True - False - Rotation configuration - - - - - False - True - 1 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - - - True - False - vertical - 5 - - - True - False - 5 - - - True - False - Error processing: - - - False - True - 0 - - - - - True - False - 0 - - Default - Output errors if log file does not exist* - Do not output errors if log file does not exist - - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - 5 - - - True - False - Rotation of jurnal even when it is empty: - - - False - True - 0 - - - - - True - False - 0 - - Default - On - Off - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - 5 - - - Do not rotate journal younger than - True - True - False - True - - - False - True - 0 - - - - - True - False - True - adjustment7 - - - False - True - 1 - - - - - True - False - days - - - False - True - 2 - - - - - False - True - 2 - - - - - True - False - 5 - - - Delete rotated journals older than - True - True - False - True - - - False - True - 0 - - - - - True - False - True - adjustment5 - - - False - True - 1 - - - - - True - False - days - - - False - True - 2 - - - - - False - True - 3 - - - - - True - False - 5 - - - Rotate journals if size more than - True - True - False - True - - - False - True - 0 - - - - - True - False - True - adjustment8 - - - False - True - 1 - - - - - True - False - False - 0 - - Kb - Mb - Gb - - - - False - True - 2 - - - - - True - False - but not earlier than the specified time interval - True - - - False - True - 3 - - - - - False - True - 4 - - - - - True - False - 5 - - - Rotate journals if size more than - True - True - False - True - - - False - True - 0 - - - - - True - False - True - adjustment9 - - - False - True - 1 - - - - - True - False - False - 0 - - Kb - Mb - Gb - - - - False - True - 2 - - - - - True - False - before specified time interval - True - - - False - True - 3 - - - - - False - True - 5 - - - - - - - - - True - False - File choosing configuration - - - - - False - True - 2 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - - - True - False - vertical - 5 - - - True - False - 5 - - - True - False - Create log - - - False - True - 0 - - - - - True - False - 0 - - Default - Do not output - Output errors - Off - - - - False - True - 1 - - - - - True - False - as user: - - - False - True - 2 - - - - - True - False - False - 0 - - Default - - - - False - True - 3 - - - - - True - False - as group: - - - False - True - 4 - - - - - True - False - False - 0 - - Default - - - - False - True - 5 - - - - - True - False - rules: - - - False - True - 6 - - - - - True - False - True - - - False - True - 7 - - - - - True - False - True - True - image5 - - - False - True - 8 - - - - - False - True - 0 - - - - - True - False - 5 - - - Cut source journal fileafter copy creating instead of moving old journal file and creating new one - True - True - False - True - - - False - True - 0 - - - - - False - True - 1 - - - - - - - - - True - False - Files and directories configuration - - - - - False - True - 3 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - - - True - False - vertical - 5 - - - True - False - 5 - - - True - False - Use compression: - - - False - True - 0 - - - - - True - False - 0 - - Default - On - Off - - - - False - True - 1 - - - - - True - False - Delay compression by one journal in queue: - - - False - True - 2 - - - - - True - False - False - 0 - - Default - Yes - No - - - - False - True - 3 - - - - - False - True - 0 - - - - - - - - - True - False - Compression configuration - - - - - False - True - 4 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - - - True - False - vertical - 5 - - - True - False - 5 - - - True - False - Save original log file after rotation if it has specified extension: - - - False - True - 0 - - - - - True - False - 0 - - Default - On - Off - - - - False - True - 1 - - - - - True - False - True - - - False - True - 2 - - - - - False - True - 0 - - - - - True - False - 5 - - - True - False - Add date of rotation before log header - - - False - True - 0 - - - - - True - False - 0 - - Default - On - Off - - - - False - True - 1 - - - - - False - True - 1 - - - - - True - False - 5 - - - True - False - Number from which numbering of old logs will begin - - - False - True - 0 - - - - - True - False - 0 - - Default - On - Off - - - - False - True - 1 - - - - - True - False - True - adjustment10 - - - False - True - 2 - - - - - False - True - 2 - + + + True + False + Compression configuration + + + + False + True + 4 + - - - True - False - Filename configuration - - - - - False - True - 5 - - - - - True - False - 0.019999999552965164 - in - + True False - 5 - 5 - 5 + 0.019999999552965164 + in - + True False - vertical - 5 + 5 + 5 + 5 True False + vertical 5 - + True False - Email after rotation: + 5 + + + True + False + Save original log file after rotation if it has specified extension: + + + False + True + 0 + + + + + True + False + 0 + + Default + On + Off + + + + False + True + 1 + + + + + True + False + True + + + False + True + 2 + + False @@ -1602,15 +1470,39 @@ - + True False - 0 - - Default - Send Email - Don't send Email - + 5 + + + True + False + Add date of rotation before log header + + + False + True + 0 + + + + + True + False + 0 + + Default + On + Off + + + + False + True + 1 + + False @@ -1619,10 +1511,52 @@ - + True False - adress: + 5 + + + True + False + Number from which numbering of old logs will begin + + + False + True + 0 + + + + + True + False + 0 + + Default + On + Off + + + + False + True + 1 + + + + + True + False + True + adjustment10 + + + False + True + 2 + + False @@ -1630,189 +1564,182 @@ 2 - - - True - False - True - - - False - True - 3 - - - - - True - False - contents: - - - False - True - 4 - - - - - True - False - False - 0 - - Default - First rotated copy - Last rotated copy - - - - False - True - 5 - - - - False - True - 0 - + + + True + False + Filename configuration + + + + False + True + 5 + - - - True - False - Message configuration - - - - - False - True - 6 - - - - - True - False - 0.019999999552965164 - in - + True False - 5 - 5 - 5 + 0.019999999552965164 + in - + True False - vertical - 5 - - - Scenarios are running for each rotated journal - True - True - False - True - - - False - True - 0 - - - - - True - False - 5 - - - True - False - Command before rotation (one time): - 0 - - - False - True - 0 - - - - - True - True - - - True - True - 1 - - - - - False - True - 1 - - + 5 + 5 + 5 True False + vertical 5 - + True False - Command after rotation (one time): - 0 - - - False - True - 0 - - - - - True - True + 5 + + + True + False + Email after rotation: + + + False + True + 0 + + + + + True + False + 0 + + Default + Send Email + Don't send Email + + + + False + True + 1 + + + + + True + False + adress: + + + False + True + 2 + + + + + True + False + True + + + False + True + 3 + + + + + True + False + contents: + + + False + True + 4 + + + + + True + False + False + 0 + + Default + First rotated copy + Last rotated copy + + + + False + True + 5 + + - True + False True - 1 + 0 - - False - True - 2 - + + + + + True + False + Message configuration + + + + + False + True + 6 + + + + + True + False + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 True False + vertical 5 - + + Scenarios are running for each rotated journal True - False - Command before rotation: - 0 + True + False + True False @@ -1821,177 +1748,212 @@ - + True - True + False + 5 + + + True + False + Command before rotation (one time): + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + - True + False True 1 - - - False - True - 3 - - - - - True - False - 5 - + True False - Command after rotation: - 0 + 5 + + + True + False + Command after rotation (one time): + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + False True - 0 + 2 - + True - True + False + 5 + + + True + False + Command before rotation: + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + - True + False True - 1 + 3 - - - False - True - 4 - - - - - True - False - 5 - + True False - Endwork command: - 0 + 5 + + + True + False + Command after rotation: + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + False True - 0 + 4 - + True - True + False + 5 + + + True + False + Endwork command: + 0 + + + False + True + 0 + + + + + True + True + + + True + True + 1 + + - True + False True - 1 + 5 - - False - True - 5 - - - - - - True - False - Scenarios - - - - - False - True - 7 - - - - - False - 5 - - - True - False - Manual input: + + + True + False + Scenarios + + False True - 0 - - - - - True - True - - - True - True - 1 + 7 - - - False - True - 8 - - - - - False - True - 1 - - - - - True - False - 0.019999999552965164 - in - - - True - False - 5 - 5 - 5 - True False 5 True False - Log (-s) size: + Manual input: False @@ -2000,10 +1962,9 @@ - + True - False - loglize + True True @@ -2012,72 +1973,135 @@ + + False + True + 8 + + + False + True + 1 + - - + + True False - Statistics + 0.019999999552965164 + in + + + True + False + 5 + 5 + 5 + + + True + False + 5 + + + True + False + Log (-s) size: + + + False + True + 0 + + + + + True + False + loglize + + + True + True + 1 + + + + + + + + + True + False + Statistics + + + + False + True + 2 + - - False - True - 2 - - - - - True - True - 0 - - - - - True - False - end - 5 - - - Save - True - True - True - image9 - True True - end - 0 + 1 - - Cancel + True - True - True - image8 + False + end + 5 + + + Save + True + True + True + image9 + + + True + True + end + 0 + + + + + Cancel + True + True + True + image8 + + + True + True + 1 + + - True + False True - 1 + 2 - False + True True 1 diff --git a/ubl-settings-logging.css b/ubl-settings-logging.css index 717c5c0..2f1e822 100644 --- a/ubl-settings-logging.css +++ b/ubl-settings-logging.css @@ -114,4 +114,9 @@ background:transparent; } .instant { transition: 0ms; +} +.errorBox { + border-width: 2px; + border-color: #ea9999; + border-style:solid; } \ No newline at end of file diff --git a/ubl-settings-logging.glade b/ubl-settings-logging.glade index ffb08cd..f254aa1 100644 --- a/ubl-settings-logging.glade +++ b/ubl-settings-logging.glade @@ -463,15 +463,9 @@ translated and supported by community. - - - - - - - - - + + + @@ -479,11 +473,8 @@ translated and supported by community. journald /var/log/journal/ System event log - 0 + False 0 - 0 - 0 - 0