AnsweredAssumed Answered

how to write to a debug log file?

Question asked by Alex_Feldstein on Jan 14, 2011
Latest reply on Oct 4, 2017 by gcubed
I am trying to learn GEL without manuals. I need to write another step in an existing audit process where the organization already has several audit steps that run daily (done before my time).

I copied a skeleton from another step, very similar to what I want/need. Changed the query to the one I want for my audit process. Test case returns one record. <for each> is suppossed to process it and eventually create an email with the audit failure (my only record returned with a made-up failure for testing).

The process executes successfully in 1 second including all the many existing audits. I get a successfull completion email from Clarity, but no results are generated (e.g. no email is sent notifying me of the audit failure as if I was a regular user).

Inspecting the extensive logs it seems it has a failure to connect to the database. Fair enough.

As a first step, to simplyify the process, following a previous example I saw, I wanted to create a debug log to see where the process fails. I can't even get the log written!

I removed all my main code and made it just a very simple "Write to log and do nothing else" as follows:
----------------------------------------
[font=Courier New]
<gel:script xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:core="jelly:core"
xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sql="jelly:sql" xmlns:xog="http://www.niku.com/xog"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<gel:log level="debug" message="------------------------------------------------"/>
<gel:log level="debug" message="*** TEST TEST TEST ***"/>
<gel:log level="debug" message="------------------------------------------------"/>
<gel:serialize fileName="D:\niku\clarity\logs\audit_output.xml" var="debugfile"/>
</gel:script>
<!-- EOF -->
[font]
----------------------------------------

This is suppossed to create an "audit_output.xml" file in the same folder as our test server niku logs. I look into the server and I see the niku logs but my debug file does not show.

I don't have a manual of GEL sysntax and could not find a detailed manual through Google, just bits and pieces of jelly referring to running in java. I am a Windows guy and understand XML/XSLT so following up GEL syntax (new to me) from the existing previous jobs was not difficult. Can anybody correct the above excerpt so I can create a log and start producing debugging messages from within my process? Thanks!

Alex

Outcomes