Post Process FIelds


Author
Message
Brad Konia
Brad Konia
I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)
Group: Forum Members
Posts: 64, Visits: 99
Could you please provide the option to apply a regex replace to the message field (or any field really)?

For example, I'm working with a log file containing stack traces. Each log entry is a single line, but it contains many stack trace lines delimited by the pound character instead of the newline character. When viewing the message, I'd like to replace those pound characters with newline characters, to make it readable.

I'm sure this could be accomplished by creating a custom processor, but that's too involved for a simple search/replace operation. It would be much more convenient to have this type of functionality available in the UI. May I suggest adding a Search/Replace option to the context meny of each column.in the log viewer. When selecting this option, it would open a modal window containing a Search box and a Replacement box. You could enter your regex patterns in each box and this search/replace operation would be performed automaticallyi from then on.
Edited 3 Years Ago by SoBeGuy
LogViewPlus Support
LogViewPlus Support
Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Hi SoBe,

Thanks for the suggestion.  As mentioned, the only way to acheive this right now is through a custom post processor.  These are the simplest type of custom extension, but I can understand the hesitation to go this route.

What you want to do here makes sense, but I think a find / replace function in the main application is a little bit confusing.  Log files should not generally be edited and I think this is somethine you want to do every time the file is opened.  So, I think we should consider a pre-defined "Find Replace" post processor that comes built-in.  I could also see the need for other predefined post processors as well such as setting the pretty-print type, so I think this approach makes sense. 

The problem is that we will need a way to configure these processors in such a way that does not further complicate the parser configuration process.  I will need to have a think about this.

Thanks again for the suggestion!

Toby
Brad Konia
Brad Konia
I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)I'm into this (260 reputation)
Group: Forum Members
Posts: 64, Visits: 99
Yes, here's what I suggest:

In the Parser Settings screen, it automatically displays a dropdown for each available category of custom processors. So, if you added some built-in processors in each category, it would always display a dropdown for each of the categories.

Now, when the user selects a custom processor, and the processor has configurable fields, it would display an elipsis button to the right of the select box. Clicking this button would open a configuration dialog for the selected processor. This dialog would contain a list of key/value pairs, allowing the user to enter a value for each key. These values would be passed to the processor as parameters. Thus, you could pass different values to each processor, depending on how it's coded.

In the example of the regex replace post processor, the keys would be Search and Replace.

I have another related suggestion. Instead of displaying a single select box for each processor type, display an add button that would open a dialog, where the user could select from any available processors, organized by category. This would allow for adding more than once instance of a processor from within the same category. When you select a processor from this dialog, it would also display the elipsis button if the processor accepts parameters. In the example of the regex replace processor, it would allow for running multiple search/replace operations.
LogViewPlus Support
LogViewPlus Support
Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)Prestige User (3.9K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.7K
Thanks SoBe.  I think we are on the same page here - and I am glad to hear that you think this solution would work for you.  I need to think a bit more about exactly how this would work, but I am definitely thinking along the same lines.

I will post back here when I have something for you to review.

Thanks again,

Toby
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search