[pve-devel] [PATCH common] Add since and until parameter to dump_journal
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Mar 1 16:32:34 CET 2016
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.1.4
More information about the pve-devel
mailing list