View Only
  • 1.  how to write to a debug log file?

    Posted Jan 14, 2011 03:39 PM
    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=""
    xmlns:sql="jelly:sql" xmlns:xog=""
    xmlns:xsd="" xmlns:xsi="">

    <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"/>
    <!-- EOF -->

    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!


  • 2.  RE: how to write to a debug log file?
    Best Answer

    Posted Jan 14, 2011 03:55 PM
    Have you got the file attached to the forum FAQ thread? ; That has got a few GEL examples in it to get you going....


    The GEL:LOG stuff dumps messages to the Clarity application process log (i.e. you see those messages only when you have run the process thru the APP and then go and look at it through the APP), GEL: OUT dumps messages onto the "standard output" - i.e. to the screen when you are running from a CMD command prompt.

    Serialize dumps XML documents (held in the GEL) to a file.

    You can code explicit open-file, write line stuff as well in GEL, there are some examples on these boards of that as well.


  • 3.  RE: how to write to a debug log file?

    Posted Jan 14, 2011 04:02 PM

    Dave wrote:

    Have you got the file attached to the forum FAQ thread? ; That has got a few GEL examples in it to get you going....
    No. Will do so now. Thanks!

  • 4.  Re: how to write to a debug log file?

    Posted Oct 04, 2017 12:07 PM

    i have this code in my gel script:


    <gel:log level="info" message="Technical Condition Update - Code Revision"/>




    <!-- Shows what the xog input file is -->
    <core:if test="${debug == true}">
    <gel:serialize fileName="d:\app\clarity\logs\refresh_assess_tc_write.xml" var="${Body}"/>

    how can I generate the refresh_assess_tc_write.xml file?

    I changed the test condition to <core:if test="${info == true}"> but still the log file is not getting created. 

    I'm expecting a new xml file to be created (d:\app\clarity\logs\refresh_assess_tc_write.xml)

    Can you please help.


  • 5.  Re: how to write to a debug log file?

    Posted Oct 04, 2017 01:49 PM

    You can't read the log level set on a <gel:log> tag.


    You could wrap you debug statements within the log tags.

    <!-- Shows what the xog input file is -->
    <gel:log level="debug" message="Technical Condition Update - Code Revision">
         <gel:serialize fileName="d:\app\clarity\logs\refresh_assess_tc_write.xml" var="${Body}"/>




  • 6.  Moving to correct board.

    Posted Jan 25, 2011 12:44 PM
    Moving to XOG/GEL/WSDL board.

  • 7.  RE: how to write to a debug log file?

    Posted Feb 01, 2011 06:50 PM

    You can use fro this xog client. Extract xog client on your computer, copy the properties.xml from the clarity server into your xog client.( I usually coping
    whole /.setup and whole /.lib directory to the XOG client file structure
    /.setup(copied from clarity structure)
    /bin(add new lib or rewrite whole directory from the clarity structure too - needs the db jar files)
    Than from command line, where you have xog client extracted from /bin folder run

    gel scriptfile.xml -verbose
    you can redirect your output into some file
    gel scriptfile.xml -verbose >1.output

    Regards, Majlos