From 19e95cd08f663e51c90bb8a510b29870121ad254 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 1 Mar 2016 16:32:34 +0100 Subject: [PATCH] Add since and until parameter to dump_journal journalctl can check their validness itself --- src/PVE/Tools.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 6303d20..1d1f4b8 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -1061,7 +1061,7 @@ sub dump_logfile { } sub dump_journal { - my ($start, $limit, $filter) = @_; + my ($start, $limit, $since, $until) = @_; my $lines = []; my $count = 0; @@ -1079,6 +1079,9 @@ sub dump_journal { }; my $cmd = ['journalctl', '-o', 'short', '--no-pager']; + + push @$cmd, '--since', $since if $since; + push @$cmd, '--until', $until if $until; run_command($cmd, outfunc => $parser); # HACK: ExtJS store.guaranteeRange() does not like empty array -- 2.39.2