DEV Community

Mayank Goyal
Mayank Goyal

Posted on • Originally published at cloudblogger.co.in on

Quickly remove Clutter from vRO Logs

Scenario

vRO provides great bit of logs out-of-the-box, but the problem is, it’s not aesthetically pleasing. Frankly, these long trials of data and time [2022-03-14 02:33:03.144 -04:00INFO] annoys me a lot. So, just like me, If you don’t want that annoyance or you want to show these logs to someone in most tidiest way, or maybe you want to preserve an action/execution, then probably you are at the right place. Let’s see how I do it.

I think the simplest way would be to find a Regex that removes it all in one go.


Solution

  • After execution of a workflow or action, copy the logs and open Notepad++.
  • Press CTRL + H. It will open Replace Tab.

  • In Find what field copy the below mentioned RegEx and In Search Mode , enable Regular Expression and tick Wrap around.

for workflows

.+?(?=:)+.+?(?=:)+.+?(?=:)+:(00|30)+(INFO|WARNING|DEBUG|ERROR)
Enter fullscreen mode Exit fullscreen mode

OR

for actions

.+?(?=:)+.+?(?=:)+.+?(?=:)+:(00|30)+(INFO|WARNING|DEBUG|ERROR)+([^)]+)\)+( +?|\t)(?=(([^"]*"){2})*[^"]*$)
Enter fullscreen mode Exit fullscreen mode
  • Click Replace All.

That’s it.


Try yourself at Regexr.com

for Workflows: regexr.com/6haum

for Actions: regexr.com/6hauv

Top comments (0)