Highlighted
Frequent Contributor.
Frequent Contributor.
532 views

How to debug groovy scripts?

Hi to all,

I'm going to develop a customized AMGenericAdapter.  Doing this, I modify a couple of groovy scripts.

Is there any posibility to debug those scripts during runtime?

Thanks in advance

Achim

0 Likes
5 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: How to debug groovy scripts?

Add a few logger.debug("My Text here, with %s variable", %myVariable); throughout the code.

These logger.debug (or logger.error, etc) will appear in the communication log.

 

Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to debug groovy scripts?

Hi

Do you have any idea which log files I need to look in OMI for debugging groovy scripts.

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to debug groovy scripts?

Hello Achim, 

 

I've seen this question yesterday on another thread for the SMpushAdapter.

Interesting enough, we have the logger classes included but we have no example in the code.

Can you raise this as a Support case so RnD can provide a feedback?

Maybe some documentation can be also improved along the way.

 

Kind regards,
Bogdan Mureșan

EMEA Technical Success
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: How to debug groovy scripts?

It will appear on the job's communication logs.
I usually set up a management zone for tests, where I add the IP ranges to test (usually 2-3 target machines).

Then I configure it so it runs only the job I want to debug, and I can view the communicaton logs.

To get to the CommLogs, go to the jobs, drill down untill you have the listing per trigger CI, where you can right mouse button -> Debug -> View Communication Log.

Highlighted
Frequent Contributor.
Frequent Contributor.

Re: How to debug groovy scripts?

Hi DBarbeiro,

do you have an example for me?

Thanks in advance

Achim

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.