Your message dated Mon, 19 Nov 2012 21:02:28 +0000 with message-id <[email protected]> and subject line Bug#693615: fixed in epylog 1.0.7-2 has caused the Debian Bug report #693615, regarding epylog: Do not support syslog-ng's option for ISO-8601 timestamps to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 693615: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693615 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: epylog Version: 1.0.7-1 Severity: normal Tags: upstream patch Hi! I'm running epylog with syslog-ng configured with the option options {ts_format(iso);}; for ISO-8601 timestamps which contain the full year and timezone data. These timestamps are not supported in version 1.0.7-1 of epylog. Following a patch for ISO-8601 support. I would be glad if this patch find it's way into epylog -- perhaps even in the upstram source. *** /home/olf/tmp/epylog-1.0.7-1.patch diff --git a/py/epylog/__init__.py b/py/epylog/__init__.py index ab762de..9ee7086 100644 --- a/py/epylog/__init__.py +++ b/py/epylog/__init__.py @@ -52,6 +52,7 @@ CHUNK_SIZE = 8192 GREP_LINES = 10000 QUEUE_LIMIT = 500 LOG_SPLIT_RE = re.compile(r'(.{15,15})\s+(\S+)\s+(.*)$') +LOG_SPLIT_ISO_TS_RE = re.compile(r'(\S+)\s+(\S+)\s+(.*)$') SYSLOG_NG_STRIP = re.compile(r'.*[@/]') MESSAGE_REPEATED_RE = re.compile(r'last message repeated (\S+) times') diff --git a/py/epylog/log.py b/py/epylog/log.py index f0750a8..d9e54a0 100644 --- a/py/epylog/log.py +++ b/py/epylog/log.py @@ -70,10 +70,21 @@ def mkstamp_from_syslog_datestr(datestr, monthmap): Takes a syslog date string and makes a timestamp out of it. """ try: - (m, d, t) = datestr.split()[:3] - y = str(monthmap[m]) - datestr = string.join([y, m, d, t], ' ') - tuptime = time.strptime(datestr, '%Y %b %d %H:%M:%S') + # time may be in ISO-8601 format + if datestr[10] == 'T': + # The timestamp can be given at arbitrary TZ, dependent of the + # TZ setting of the local (or remote?) syslog daemon. + # For now assume timestamps given in correct local TZ and ignore + # the specified TZ which can not be parsed with time.strptime(). + # Format of the ISO time string: + # YYYY-mm-ddTHH:MM:SS[.fraction]<timezone-spec> + # FIXME: assume timestamp in local TZ + tuptime = time.strptime(datestr[:19], '%Y-%m-%dT%H:%M:%S') + else: + (m, d, t) = datestr.split()[:3] + y = str(monthmap[m]) + datestr = string.join([y, m, d, t], ' ') + tuptime = time.strptime(datestr, '%Y %b %d %H:%M:%S') ## # Python 2.2.2 (at least) breaks with DST. # Work around. @@ -92,7 +103,11 @@ def get_stamp_sys_msg(line, monthmap): This function takes a syslog line and returns the timestamp of the event, the system where it occured, and the message. """ - mo = epylog.LOG_SPLIT_RE.match(line) + # Assume ISO-8601 timestmps when the 11'th character is 'T' + if line[10] == 'T': + mo = epylog.LOG_SPLIT_ISO_TS_RE.match(line) + else: + mo = epylog.LOG_SPLIT_RE.match(line) if not mo: raise ValueError('Unknown line format: %s' % line) time, sys, msg = mo.groups() stamp = mkstamp_from_syslog_datestr(time, monthmap) -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (900, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
--- End Message ---
--- Begin Message ---Source: epylog Source-Version: 1.0.7-2 We believe that the bug you reported is fixed in the latest version of epylog, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Tiago Bortoletto Vaz <[email protected]> (supplier of updated epylog package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Mon, 19 Nov 2012 15:42:57 -0500 Source: epylog Binary: epylog Architecture: source all Version: 1.0.7-2 Distribution: unstable Urgency: low Maintainer: Tiago Bortoletto Vaz <[email protected]> Changed-By: Tiago Bortoletto Vaz <[email protected]> Description: epylog - New logs analyzer and parser Closes: 693615 Changes: epylog (1.0.7-2) unstable; urgency=low . * Adding patch to support ISO-8601 timestamps. Thanks to Olaf Ohlenmacher. (Closes: #693615) Checksums-Sha1: 455c8508a887e001cd0458312da2453a915f6a68 1259 epylog_1.0.7-2.dsc 16c2eccb05b30faf6eadcf92b9dc64bb7989b2eb 5871 epylog_1.0.7-2.debian.tar.gz 03252ab766a23e0c41a9d69d919bb7fb85aeb3d7 91464 epylog_1.0.7-2_all.deb Checksums-Sha256: 7c7267a48f56a121b0c06a666ed245a0e14465a2843f88bbd138040fb8534f06 1259 epylog_1.0.7-2.dsc d5fcf17416ad0b53e4648e08a3d5df075bf7daca9203d084f2d8d4cc83e10e93 5871 epylog_1.0.7-2.debian.tar.gz 9d786ed32f5a2b094961edffd77ee86c46e78ea7b9d057c3400eaaa804c1cacf 91464 epylog_1.0.7-2_all.deb Files: f476fc8cbebc06a570d27e4cf40c4254 1259 python extra epylog_1.0.7-2.dsc 6d05ba99efeedbde992084d010515a3f 5871 python extra epylog_1.0.7-2.debian.tar.gz 79e94a6e7795ac63bda41697bb5585c6 91464 python extra epylog_1.0.7-2_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlCqnCoACgkQaQ1iFKUE/soMsQCeJFPyrp0f0ElLsVCbP0pegYmI yU0AoJEojW2/Tl1wsYEYPeTYNcjICzZH =6o24 -----END PGP SIGNATURE-----
--- End Message ---

