Added 'graphql-api.log' to diagnostics

This commit is contained in:
bergware
2019-11-11 07:08:21 +01:00
parent 488ce1f41c
commit 115cd5147c

View File

@@ -260,6 +260,12 @@ foreach (glob("/var/log/syslog*") as $file) {
if (basename($file)=='syslog' && filesize($file)>=$max) exert("tail -n 200 ".escapeshellarg("$log.txt")." >".escapeshellarg("$log.last200.txt"));
exert("truncate -s '<$max' ".escapeshellarg("$log.txt"));
}
// copy graphql-api.log
$graphql = "/var/log/graphql-api.log";
if (file_exists($graphql)) {
$log = "/$diag/logs/graphql-api.txt";
exert("todos <$graphql >".escapeshellarg($log));
}
// create resulting zip file and remove temp folder
exert("zip -qmr ".escapeshellarg($zip)." ".escapeshellarg("/$diag"));
if ($cli) echo "done.\nZIP file '$zip' created.\n";