summaryrefslogtreecommitdiffstats
path: root/modules/systemstatus.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2015-10-27 11:22:35 +0100
committerSimon Rettberg2015-10-27 11:22:35 +0100
commit0b5ac502100172e15a0d1a243be9416b1e8715ce (patch)
treee5bc385f9fdc9c55d848f0c57a00367d2e20a793 /modules/systemstatus.inc.php
parent[config vars] Support SLX_DEMO_PASS (diff)
downloadslx-admin-0b5ac502100172e15a0d1a243be9416b1e8715ce.tar.gz
slx-admin-0b5ac502100172e15a0d1a243be9416b1e8715ce.tar.xz
slx-admin-0b5ac502100172e15a0d1a243be9416b1e8715ce.zip
[systemstatus] Move ldadp logs to /var/log/ldadp
Diffstat (limited to 'modules/systemstatus.inc.php')
-rw-r--r--modules/systemstatus.inc.php16
1 files changed, 13 insertions, 3 deletions
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 '<pre>', htmlspecialchars(substr($data, strpos($data, "\n") + 1)), '</pre>';
+ if (strlen($data) < 5990) {
+ $start = 0;
+ } else {
+ $start = strpos($data, "\n") + 1;
+ }
+ echo '<pre>', htmlspecialchars(substr($data, $start)), '</pre>';
}
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 '<pre>Error reading from log file</pre>';
continue;
}
- echo '<pre>', htmlspecialchars(substr($data, strpos($data, "\n") + 1)), '</pre>';
+ if (strlen($data) < 4990) {
+ $start = 0;
+ } else {
+ $start = strpos($data, "\n") + 1;
+ }
+ echo '<pre>', htmlspecialchars(substr($data, $start)), '</pre>';
}
}