In this article
Orchestrator gives you a good amount of logs out of the box, but they aren’t pleasant to read. Every line starts with a long date, time and severity like 2022-03-14 02:33:03.144 -04:00INFO. If you want to share logs with someone in a tidy way, or keep the results of an action or workflow run, a regex can strip all that clutter in one go. Here’s how I do it.
Tested on: VCF Operations Orchestrator 9.1.1 (same log format as 8.x) and vRealize Orchestrator 8.x (original post, 2022).
How it works
Copy the logs from the Logs tab of a workflow run or action run, paste them into a text editor that supports regular expressions, and replace the timestamp part with nothing. I use Notepad++, but VS Code’s Replace (with the .* regex option turned on) works the same way.
Step by step
Open Replace in Notepad++
- After a workflow or action run, copy the logs and paste them into Notepad++.
- Press Ctrl + H to open the Replace tab.

- Paste one of the regexes below into Find what, leave Replace with empty, set Search Mode to Regular expression and tick Wrap around.

Regex for workflow logs
.+?(?=:)+.+?(?=:)+.+?(?=:)+:(00|30)+(INFO|WARNING|DEBUG|ERROR)
An alternative from the original post, which matches the date and time by pattern:
([0-9]+(-[0-9]+)+) [0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{1,3})? ([+-]?(?=\.\d|\d)(?:\d+)?(?:\.?\d*))(?:[Ee]([+-]?\d+))? [A-Za-z]+
Regex for action logs
Action logs also include the action name in brackets, so this one removes that too:
.+?(?=:)+.+?(?=:)+.+?(?=:)+:(00|30)+(INFO|WARNING|DEBUG|ERROR)+([^)]+)\)+( +?|\t)(?=(([^"]*"){2})*[^"]*$)
Replace all
- Click Replace All.
Result
Only the log messages are left. Here’s a quick demo:
You can also try the regexes on sample logs at Regexr: workflow logs and action logs.
Things to watch out for
- Time zone offset. The first workflow regex and the action regex expect an offset ending in
:00or:30, like-04:00or+05:30. If your server runs in a zone like+05:45, change(00|30)to(00|30|45). - Keep a copy. Replace All changes the whole file, so keep the original logs if you might need the timestamps later.
- Build your own. If your log format is different, you can create a regex quickly with the Regex Generator.
Wrapping up
A small trick, but it saves me a lot of scrolling when I share logs or paste them into a ticket. If you have a better regex, feel free to share it in the comments. See you in the next post.
Discover more from Cloud Blogger
Subscribe to get the latest posts sent to your email.
Enjoyed this post?
Was this helpful?
One response to “Quickly Remove Clutter from vRO Logs”
-
[…] can use https://cloudblogger.co.in/2022/03/14/quickly-remove-clutter-from-vro-logs/ to get a clean list of […]





























Leave a Reply