if ($format eq 'syslog') {
if ($line =~ /^(...)\s+(\d+)\s(\d+):(\d+):(\d+)\s([^\s]+)\s([^\[]+)\[(\d+)\]:\s\[([0-9\-]+)\]\s*(.*?)\s+([A-Z]+:)\s+(.*)/) {
+
# skip non postgresql lines
next if ($7 ne $ident);
# Syslog do not have year information, so take care of year overlapping
{
my ($t_year, $t_month, $t_day, $t_hour, $t_min, $t_sec, $t_host, $t_pid, $t_session, $t_logprefix, $t_loglevel, $t_query) = @_;
+
# Get log level
if ($t_loglevel !~ s/^.*(LOG|WARNING|ERROR|FATAL|PANIC|DETAIL|STATEMENT|HINT|CONTEXT):$/$1/) {
# Unrecognized loglevel format
next if (!$line);
$nline++;
# Is syslog lines ?
- if ($line =~ /^...\s\d+\s\d+:\d+:\d+\s[^\s]+\s[^\[]+\[\d+\]:\s\[[0-9\-]+\]\s.*:\s+$duration/) {
+ if ($line =~ /^...\s+\d+\s\d+:\d+:\d+\s[^\s]+\s[^\[]+\[\d+\]:\s\[[0-9\-]+\]\s.*:\s+$duration/) {
$fmt = 'syslog';
$nfound++;
# Is stderr lines