From 0b5ac502100172e15a0d1a243be9416b1e8715ce Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 27 Oct 2015 11:22:35 +0100 Subject: [systemstatus] Move ldadp logs to /var/log/ldadp --- modules/systemstatus.inc.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'modules/systemstatus.inc.php') diff --git a/modules/systemstatus.inc.php b/modules/systemstatus.inc.php index 7c3fe8a1..f8bf7383 100644 --- a/modules/systemstatus.inc.php +++ b/modules/systemstatus.inc.php @@ -263,12 +263,17 @@ class Page_SystemStatus extends Page @fclose($fh); } } - echo '
', htmlspecialchars(substr($data, strpos($data, "\n") + 1)), '
'; + if (strlen($data) < 5990) { + $start = 0; + } else { + $start = strpos($data, "\n") + 1; + } + echo '
', htmlspecialchars(substr($data, $start)), '
'; } protected function ajaxLdadpLog() { - $files = glob('/opt/ldadp/logs/*.log', GLOB_NOSORT); + $files = glob('/var/log/ldadp/*.log', GLOB_NOSORT); if ($files === false || empty($files)) echo('No logs found'); $now = time(); foreach ($files as $file) { @@ -294,7 +299,12 @@ class Page_SystemStatus extends Page echo '
Error reading from log file
'; continue; } - echo '
', htmlspecialchars(substr($data, strpos($data, "\n") + 1)), '
'; + if (strlen($data) < 4990) { + $start = 0; + } else { + $start = strpos($data, "\n") + 1; + } + echo '
', htmlspecialchars(substr($data, $start)), '
'; } } -- cgit v1.2.3-55-g7522