1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2026-01-07 05:59:17 +00:00

[Web] add crontasks logs

This commit is contained in:
FreddleSpl0it
2023-07-06 15:53:33 +02:00
committed by DerLinkman
parent dce3239809
commit 4bb02f4bb0
4 changed files with 110 additions and 0 deletions

View File

@@ -2537,6 +2537,20 @@ function get_logs($application, $lines = false) {
return $data_array;
}
}
if ($application == "cron-mailcow") {
if (isset($from) && isset($to)) {
$data = $redis->lRange('CRON_LOG', $from - 1, $to - 1);
}
else {
$data = $redis->lRange('CRON_LOG', 0, $lines);
}
if ($data) {
foreach ($data as $json_line) {
$data_array[] = json_decode($json_line, true);
}
return $data_array;
}
}
if ($application == "postfix-mailcow") {
if (isset($from) && isset($to)) {
$data = $redis->lRange('POSTFIX_MAILLOG', $from - 1, $to - 1);