diff options
author | Urban Müller | 2023-05-08 14:17:52 +0200 |
---|---|---|
committer | Urban Müller | 2023-05-08 14:17:52 +0200 |
commit | 9ce1061573da6196aa18f54e626a3ffa759b9666 (patch) | |
tree | 63db4ddca0730087a6a6e9e8cbf3a98cbd9d155d | |
parent | 76d976bd078e9985855aa8649e121a298bf154f8 (diff) | |
download | itools-9ce1061573da6196aa18f54e626a3ffa759b9666.tar.gz itools-9ce1061573da6196aa18f54e626a3ffa759b9666.tar.bz2 itools-9ce1061573da6196aa18f54e626a3ffa759b9666.zip |
avoid stderr when no alertlogs present yet
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -293,7 +293,7 @@ static function error($p = array(), $extra = null) $longstack = it_debug::backtrace(['trace' => $backtrace, 'format' => "long"]); $reqbody = it::file_get_contents("php://input"); - $body .= ($trace and $t = it::exec('grep -h {0} `ls {1}/log/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace, $home)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t\n" : ""; + $body .= ($trace and $t = it::exec('grep -h {0} `ls 2>/dev/null {1}/log/alertlog-*|tail -3` /dev/null 2>/dev/null | grep ^2 | cut -d : -f 1-2 | sort | uniq -c | tail -10', $trace, $home)) ? "Histogram: (last 10 affected minutes in 3 days)\n$t\n" : ""; $body .= $mediumstack ? "Stack:\n " . it::replace(["\n" => "\n "], $mediumstack) . "\n" : ""; $body .= $_GET ? "\$_GET: " . var_export($_GET, true) . "\n\n" : ""; $body .= $_POST ? "\$_POST: " . var_export($_POST, true) . "\n\n" : ""; |