Subversion Repositories logviewer

Rev

Rev 9 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 10
Line 80... Line 80...
80
        foreach ($lines as $line) {
80
        foreach ($lines as $line) {
81
                $line_no++;
81
                $line_no++;
82
                $line = trim($line);
82
                $line = trim($line);
83
 
83
 
84
                if (preg_match('@^\[(.*)\] \[(.*)\] \[(.*)\] \[(.*)\] (.*)$@ismU', $line, $m)) {
84
                if (preg_match('@^\[(.*)\] \[(.*)\] \[(.*)\] \[(.*)\] (.*)$@ismU', $line, $m)) {
85
                        #[Sun Aug 13 15:54:16.054530 2017] [fcgid:warn] [pid 28401] [client 104.236.113.44:52188] mod_fcgid: stderr: PHP Notice:  Undefined offset: 11 in /home/d
85
                        // [Sun Aug 13 15:54:16.054530 2017] [fcgid:warn] [pid 28401] [client 104.236.113.44:52188] mod_fcgid: stderr: PHP Notice:  Undefined offset: 11 in /home/d
86
                        $time = $m[1];
86
                        $time = $m[1];
87
                        $modul = $m[2];
87
                        $modul = $m[2];
88
                        $text = $m[5];
88
                        $text = $m[5];
89
 
89
 
90
                        $time = trim(substr($time, 4, 6)).' '.substr($time, -4).' '.substr($time, 11, 8);
90
                        $time = trim(substr($time, 4, 6)).' '.substr($time, -4).' '.substr($time, 11, 8);
91
                        $time_mysql = date('Y-m-d H:i:s', strtotime($time));
91
                        $time_mysql = date('Y-m-d H:i:s', strtotime($time));
92
                } else if (preg_match('@^(.+)\|(.+)\|(.+)\|(.+)$@ismU', $line, $m)) {
92
                } else if (preg_match('@^(.+)\|(.+)\|(.+)\|(.+)$@ismU', $line, $m)) {
93
                        #  5.6 | /daten/homes/daniel-marschall/hosts/dracenmarx/public_html/wiki/vendor/oyejorge/less.php/lib:91            | ini              | Ini mbstring.internal_encoding is deprecated.
93
                        // 5.6 | /daten/homes/daniel-marschall/hosts/dracenmarx/public_html/wiki/vendor/oyejorge/less.php/lib:91            | ini              | Ini mbstring.internal_encoding is deprecated.
94
                        // A special implementation of PHP codefixer (showing the full path) . TODO: release
94
                        // A special implementation of PHP codefixer (showing the full path) . TODO: release
95
                        $time = filemtime($file);
95
                        $time = filemtime($file);
96
                        $modul = 'php_codefixer';
96
                        $modul = 'php_codefixer';
97
                        $text = 'PHP Codefixer: ' . trim($m[4]) . ' in ' . trim($m[2]);
97
                        $text = 'PHP Codefixer: ' . trim($m[4]) . ' in ' . trim($m[2]);
98
 
98
 
Line 179... Line 179...
179
}
179
}
180
echo "\n";
180
echo "\n";
181
 
181
 
182
file_put_contents($TMP_FILE, serialize($cache));
182
file_put_contents($TMP_FILE, serialize($cache));
183
 
183
 
-
 
184
// Prune old logs
-
 
185
 
-
 
186
mysql_query('delete from vts_fehlerlog where letzter < date_sub(now(),interval 3 year)');
-
 
187
 
184
# ---
188
# ---
185
 
189
 
186
function removeLogrotateSuffix($filename) {
190
function removeLogrotateSuffix($filename) {
187
        $filename = preg_replace('@\\.(\\d+)(\\.gz){0,1}$@ismU', '', $filename);
191
        $filename = preg_replace('@\\.(\\d+)(\\.gz){0,1}$@ismU', '', $filename);
188
        return $filename;
192
        return $filename;