5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2025-08-28 05:49:35 +03:00

Add since and until parameter to dump_journal

journalctl can check their validness itself
This commit is contained in:
Thomas Lamprecht
2016-03-01 16:32:34 +01:00
committed by Dietmar Maurer
parent 7b1e4b04b2
commit 19e95cd08f

View File

@ -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