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

Reinvent your career. Join DEV.

It takes one minute and is worth it for your career.

Get started

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay