From d3a068ad0ad13ddae0ff6c80c990ade4318fcef5 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Sun, 26 Jan 2025 03:50:12 -0800 Subject: [PATCH] Fix warnings in Log Analyzer Signed-off-by: Emmanuel Ferdman --- apamax/log_analyzer.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apamax/log_analyzer.py b/apamax/log_analyzer.py index 59c5b21..b82cc81 100755 --- a/apamax/log_analyzer.py +++ b/apamax/log_analyzer.py @@ -1365,23 +1365,23 @@ def writeSampleLine(prefix, line): CONNECTION_LINE_REGEX_PRE10_7 = re.compile( # This regex is for sender/receiver connection lines prior to Apama 10.7(.1); # the (?Pxxxx) syntax identifies named groups in the regular expression - - # hack: hope/assume that pointer addresses are always prefixed with 00 on linux - # this regex gets the objectAddr in all cases, and for "slow" messages also the logical/physical ids; for other + + # hack: hope/assume that pointer addresses are always prefixed with 00 on linux + # this regex gets the objectAddr in all cases, and for "slow" messages also the logical/physical ids; for other # messages we separately use CONNECTION_MESSAGE_IDS_REGEX to get those r"^(?PReceiver|Connected to receiver|Blocking receiver) (?P.+) [(]"+\ - "(component ID (?P[0-9]+)/(?P[0-9]+) \[)?"+\ - "(?P(0x|00)[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]+)\]?[)] (?P.+)" - ) + r"(component ID (?P[0-9]+)/(?P[0-9]+) \[)?"+\ + r"(?P(0x|00)[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]+)\]?[)] (?P.+)" + ) CONNECTION_LINE_REGEX_POST10_7 = re.compile( # This regex is for sender/receiver connection lines from Apama 10.7.1 onwards # the (?Pxxxx) syntax identifies named groups in the regular expression # messages will contain all connected and disconnected lines in newLogFormat r"^(?PExternal sender|External receiver) \"(?P.+)\" " + \ - "[0-9]+), connection (?P[0-9]+), " + \ - "address (?P[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+):(?P[0-9]+)> " + \ - "(?Pconnected|disconnected cleanly|disconnected uncleanly|[^:]+): (?P.+)" + r"[0-9]+), connection (?P[0-9]+), " + \ + r"address (?P[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+):(?P[0-9]+)> " + \ + r"(?Pconnected|disconnected cleanly|disconnected uncleanly|[^:]+): (?P.+)" ) def handleConnectionMessage(self, file, line, **extra): @@ -2521,7 +2521,7 @@ def main(self, args): else u'%(levelname)-5s - %(message)s', stream=sys.stderr, level=loglevel) - log.info('Apama log analyzer v%s (locale=%s)'%(__version__, locale.getdefaultlocale()[0])) + log.info('Apama log analyzer v%s (locale=%s)'%(__version__, locale.getlocale()[0])) duration = time.time()