On Mon, May 10, 2021 at 9:07 AM Francesco Chicchiriccò <[email protected]> wrote:
> On 07/05/21 19:50, Martin van Es wrote: > > Another question. > How would I print debug (core.log) statements in a Groovy propagation > action script? > > Not very related to the subject, but you can find a relevant example here: > > > https://github.com/apache/syncope/blob/2_1_X/fit/core-reference/src/test/resources/rest/SearchScript.groovy#L104 > > Thx for your input! This is the output when I blindly add log.info() to a test Groovy propagation action script: 11:57:53.811 DEBUG org.apache.syncope.core.provisioning.java.ConnectorManager - Connector to be registered: ConnectorFacadeProxy{connector=org.identityconnectors.framework.impl.api.local.LocalConnectorFacadeImpl@63b8 d810 capabitilies=[UPDATE, DELETE, CREATE, SEARCH, AUTHENTICATE]} 11:57:53.811 DEBUG org.apache.syncope.core.provisioning.java.ConnectorManager - Successfully registered bean connInstance-Master-3229BE00-2A72-4A78-A9BE-002A729A784D-service-cloud 11:57:53.813 DEBUG org.apache.syncope.core.provisioning.api.job.SchedTaskJobDelegate - Executing push on JPAExternalResource[service-cloud] 11:57:54.063 DEBUG org.apache.syncope.core.provisioning.api.pushpull.SyncopeResultHandler - Pushing USER with key 89b4b6da-1ef3-4720-b4b6-da1ef3072081 towards JPAExternalResource[service-cloud] 11:57:56.666 ERROR org.apache.syncope.core.provisioning.java.pushpull.OutboundMatcher - While building JPAImplementation[My_Groovy_PropagationAction] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script_591aa0a4f0c025faabe5fd7f86d74fb0.groovy: 39: [Static type checking] - The variable [log] is undeclared. @ line 39, column 5. log.info("Entering " + action + " Script"); ^ The main problem here probably is that I'm not a hard-core Java developer and I'm trying to create a maximum flexibility, zero-compilation identity synchronisation setup for the team to work with. Simple syncope-console editable Groovy scripts would help tremendously with that goal! Best regards. Martin
