Parse log file without trailing newline

Started by mashedpotatorocket, October 25, 2022, 09:32:25 PM

Previous topic - Next topic

mashedpotatorocket

Hi.

I have a log parser for TeamViewer's "Connections_incoming.txt". Example file attached.
It works when i manually add a new line with a trailing newline (CRLF), but TeamViewer doesn't add a newline at the end of new log entries, it's added at the beginning (which means the log file has an empty row at the top).

How can I make NetXMS notice new log entries when they doesn't end with CRLF?


While I'm at it, if I use named captures, how do I reference them by name in the Event Message?

(?<ID>.*?)\t(?<RemoteClient>.*?)\t(?<StartTime>.*?)\t(?<EndTime>.*?)\t(?<LoggedonUser>.*?)\t(?<Action>.*?)\t(?<GUID>.*?)\t

Victor Kirhenshtein

It is not possible without changes in log parser code. Named capture groups also not supported. I've added feature requests for both:

https://track.radensolutions.com/issue/NX-2312
https://track.radensolutions.com/issue/NX-2313

Best regards,
Victor

mashedpotatorocket