Non-greedy string specifier in the Pattern parser?


Author
Message
Zoltan Kelemen
Zoltan Kelemen
I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)I'm into this (229 reputation)
Group: Forum Members
Posts: 21, Visits: 97
Hi,

I was wondering if it would be possible to add an option to %S - or perhaps have another string specifier - that would act non-greedy, i.e. match the first occurrence of the following separator, not the last?

i.e. I have the following line, say

2022-05-12T19:21:25.065+0200; DEBUG; hostname123; P4216/T31; [Component]; Conversation state changed: ACTIVE -> ACTIVE. Call leg state changed: CallLegStateChange[ACTIVE->ACTIVE for callLeg: CallLeg [2c8a32f9066d396540b7024414c86fe8@1.2.3.4 -- D-638b5c9f-b60e-4d55-9544-cdbc51b5cd06] state: ActiveState@4b9f5055, status=UnknownStatus@2fb72ab2, additionalData=null];

And I'd like to parse this with:
%d{yyyy-MM-ddT%H:mm:ss.fffzzzz}; %p; %c; %t; [%S{Component}]; %S{Action}: %m%n

Where I'd want the Action field to be "Conversation state changed"

I can't really seem to make this work with a Pattern Parser.
Probably could either do a custom parser, or a regex parser, but I was thinking this feature may be a useful addition to the simple pattern parser as well.

Thanks,
  Zoltan

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Login

Explore
Messages
Mentions
Search