logdrake does not work with system-journald, and rsyslog is not installed by default in mga3 so unless the user knows to install rsyslog then logdrake will appear to be broken. Since this is probably a low priority for devs I have modified logdrake myself to work with both system-journald and conventional log files. Patch to follow.
Created attachment 3390 [details] Logdrake with systemd-journald function On left hand side are log files to view. The 'system log' is actually journald. Any file not present is greyed out. Priority level filters on log level priority in journald.
Created attachment 3391 [details] Patch for logdrake to read system-journald I am sure this could be coded better, but it seems to work OK
Keywords: (none) => PATCHWhiteboard: (none) => 3beta2
Created attachment 3393 [details] Revised with improved layout Improved version with better layout for small screens
Attachment 3391 is obsolete: 0 => 1
dups but I will keeps yours
CC: (none) => mageia, thierry.vignaudBlocks: (none) => 8039
*** Bug 8030 has been marked as a duplicate of this bug. ***
CC: (none) => marc.lattemann
- /usr/sbin/logdrake 2013-01-16 21:18:34.000000000 +0000 +++ logdrake 2013-01-17 22:45:15.000000000 +0000 @@ -61,9 +61,10 @@ my $mday = (localtime(time()))[3]; $cal->select_day($mday); my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); -my $cal_mode = 0; -my $cal_butt = gtksignal_connect(Gtk2::CheckButton->new(N("Show only for the selected day")), clicked => sub { $cal_mode = !$cal_mode; gtkset_sensitive($cal,$cal_mode) }); - +my @monthsdecimal = qw(01 02 03 04 05 06 07 08 09 10 11 12); +my $cal_mode = 1; +#my $cal_butt = gtksignal_connect(Gtk2::CheckButton->new(N("Show only for the selected day")), clicked => sub { $cal_mode = !$cal_mode; gtkset_sensitive($cal,$cal_mode) }); +gtkset_sensitive($cal,$cal_mode); why do you have commented this code ? 110,10 +111,17 @@ "auth" => { file => "/var/log/auth.log", desc => N("_:this is the auth.log log file\nAuthentication") }, "user" => { file => "/var/log/user.log", desc => N("_:this is the user.log log file\nUser") }, "messages" => { file => "/var/log/messages", desc => N("_:this is the /var/log/messages log file\nMessages") }, - "syslog" => { file => "/var/log/syslog", desc => N("_:this is the /var/log/syslog log file\nSyslog") }, + "syslog" => { file => "/usr/bin/journalctl", desc => N("_:this is the main system journal\nSystem log") }, this should handle when rsyslog is installed and used because here you "force" the use of journalctl whereas we still can use rsyslog. - 1, gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Choose file")),2), + 1, gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Log File")),2), i don't know about this, the previous sentence was OK ( but this is not an important remark here )
CC: (none) => nicolas.lecureuil
(In reply to comment #6) > +#my $cal_butt = gtksignal_connect(Gtk2::CheckButton->new(N("Show only for the > selected day")), clicked => sub { $cal_mode = !$cal_mode; > gtkset_sensitive($cal,$cal_mode) }); > +gtkset_sensitive($cal,$cal_mode); > > why do you have commented this code ? > Because logdrake always required the 'Show only for selected day' checkbox to be selected. If it was unselected then it nevers shows any results. There is no point having a checkbox that always has to be selected. Also removing the checkbox saves on vertical space which is useful on a small screen. I should have removed the line instead of just commenting it. > > 110,10 +111,17 @@ > "auth" => { file => "/var/log/auth.log", desc => N("_:this is the > auth.log log file\nAuthentication") }, > "user" => { file => "/var/log/user.log", desc => N("_:this is the > user.log log file\nUser") }, > "messages" => { file => "/var/log/messages", desc => N("_:this is the > /var/log/messages log file\nMessages") }, > - "syslog" => { file => "/var/log/syslog", desc => N("_:this is the > /var/log/syslog log file\nSyslog") }, > + "syslog" => { file => "/usr/bin/journalctl", desc => N("_:this is the > main system journal\nSystem log") }, > > this should handle when rsyslog is installed and used because here you "force" > the use of journalctl whereas we still can use rsyslog. > Yes. You are correct. I was assuming that journalctl would always be available and even if rsyslogd was available it was preferable to search journalctl because it can be filtered by date range and message type without having to parse the entire file. > > - 1, > gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Choose file")),2), > + 1, > gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Log File")),2), > > i don't know about this, the previous sentence was OK ( but this is not an > important remark here ) I agree. It makes little difference.
Created attachment 3509 [details] Tidier version Is this better? If systemd-journald is running selecting 'syslog' will search with journalctl if not then it behaves as before and will search /var/log/syslog
Attachment 3390 is obsolete: 0 => 1 Attachment 3393 is obsolete: 0 => 1
Don't remove the N() calls (you're breaking the translations) Also why do you remove some conf stuff? Why do you remove the settings frame? About the "only this day" feature, I don't see why it couldn't be make to work with journald This should be done incrementally and thus split into smaller bits: - journald support - handling priority - removing frames (which I don't agree with)
for rsyslog, i think this should be available but "greyed" if rsyslog isn't installed.
As I won't have time to do much about this before release, I've simply added some code (subsequently tidied by Thierry) that ensures a syslog-daemon is installed. It's not ideal, but I think it's OK as a stop-gap to a full reimplementation as a journal viewer! @Derek your help here is *really* appreciated. I think if the patch was tidied up as Thierry suggested we could look into merging it (in part at least), but this is unlikely to happen before release. Also FYI, we will be moving the drakxtools to git shortly after MGA3 release so this should make contributing easier :)
I've added some explanations in release notes. Tested here it works properly, meaning all gray when rsyslog is not installed but ok when in the contrary
Status: NEW => RESOLVEDCC: (none) => ennael1Resolution: (none) => FIXED