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

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay