fix wrong regex for logs with unexpected spacing

* add "\ *" arround level, component, sid and message
This commit is contained in:
Thor77 2016-06-07 16:51:55 +02:00
parent 5c44f0ca47
commit c3cfad0a88
3 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ author = 'Thor77'
# The short X.Y version.
version = '0.5'
# The full version, including alpha/beta/rc tags.
release = '0.5.7'
release = '0.5.8'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='tsstats',
version='0.5.7',
version='0.5.8',
author='Thor77',
author_email='thor77@thor77.org',
description='A simple Teamspeak stats-generator',

View File

@ -6,8 +6,8 @@ from glob import glob
from tsstats.client import Client, Clients
re_log_entry = re.compile('(?P<timestamp>\d{4}-\d\d-\d\d\ \d\d:\d\d:\d\d.\d+)'
'\|(?P<level>\w+)\ +\|(?P<component>\w+)'
'\|\ +(?P<sid>\d+)\|\ (?P<message>.*)')
'\|\ *(?P<level>\w+)\ *\|\ *(?P<component>\w+)\ *'
'\|\ *(?P<sid>\d+)\ *\|\ *(?P<message>.*)')
re_dis_connect = re.compile(r"'(.*)'\(id:(\d*)\)")
re_disconnect_invoker = re.compile(
r'invokername=(.*)\ invokeruid=(.*)\ reasonmsg'