log parsing
-
-
hi!
currently named parameters are not supported in the log parser. If you pass multiple parameters, they will be numbered in order they appear in regexp. For example, if you have the following rule:
<match>Error (.*) at (.*)</match>
<event params="2">200000</match>You will have two parameters - number 1 and number 2, and it will be possible to use them in macro expansion as %1 and %2. For log record
Error 4 at test
with this rule you will have
%1 == "4"
%2 == "test"Best regards,
Victor -
thank you victor.
i have another 2 questions that came up my mind reading your answer.- can one xml file contain 2 <parser> sections ?
- can the <event> contain two attributes meaning passing the two param ? something like this <event params="1","2"> or <event params="1",params="2">
10x,
lindeamon -
- No. You should create separate xml file for each parser.
- You can pass as many parameters as you like. Attribute params contains number of parameters, so if you have 4 parameters for the event, you will have <event params="4">. Of course you have to have appropriate number of capturing groups in regular expression.
Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login