Good Morning,

Got a couple questions for you.

1) Can 'pythonloglevel' and 'pythonoutput' be modified at runtime? In other
words, can a script override the values set in staf.cfg?

2) What 'pythonloglevel' would be certain to show all messages?  Reading the
docs, it isn't clear to me.

Thanks,
-T


On Tue, Jul 19, 2011 at 10:24 AM, Sharon Lucas <luc...@us.ibm.com> wrote:

> I tried to recreate the problem but it worked fine for me.  I created a
> STAX job that called execfile to run a .py file within a <script> element.
>  The .py file's print statement appeared in the STAX Job User Log and in the
> STAX Monitor messages just like print statements that are contained directly
> within a <script> element.  If you doing something different, let me know.
>  Here's the STAX job and .py file that I ran:
>
> Contents of C:\stax\testScriptFile.py:
>
> print 'Printed by testScriptFile.py'
>
> Contents of C:\stax\execFile.xml:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE stax SYSTEM "stax.dtd">
>
> <stax>
>
>   <defaultcall function="Main"/>
>
>   <function name="Main" scope="local">
>     <sequence>
>       <script>
>         print 'Printed by script element in job'
>         execfile('C:/stax/testScriptFile.py')
>       </script>
>     </sequence>
>   </function>
> </stax>
>
> Here's the STAX Job Log User file output: (these message also appeared in
> the STAX Monitor's Messages panel)
>
> C:\>STAF local LOG QUERY MACHINE {STAF/Config/MachineNickname} LOGNAME
> STAX_Job_3_User
> Response
> --------
> Date-Time         Level Message
> ----------------- ----- ---------------------------------
> 20110719-12:14:57 Info  Printed by script element in job
> 20110719-12:14:57 Info  Printed by testScriptFile.py
>
> Here are the settings for the STAX service that show "Python Output" is set
> to "JobUserLogAndMsg":
>
> C:\>STAF local STAX LIST SETTINGS
> Response
> --------
> {
>   Event Machine         : local
>   Event Service Name    : Event
>   Number of Threads     : 5
>   Process Timeout       : 60000
>   File Caching          : Enabled
>   Max File Cache Size   : 20
>   File Cache Algorithm  : LRU
>   Max File Cache Age    : 0
>   Max Machine Cache Size: 20
>   Max Return File Size  : 0
>   Max Get Queue Messages: 25
>   Max STAX-Threads      : 0
>   Clear Logs            : Enabled
>   Log TC Elapsed Time   : Enabled
>   Log TC Num Starts     : Enabled
>   Log TC Start/Stop     : Disabled
>   Python Output         : JobUserLogAndMsg
>   Python Log Level      : Info
>   Extensions            : []
>   Extension File        : <None>
> }
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin,   luc...@us.ibm.com
> (512) 286-7313 or Tieline 363-7313
>
>
>
>
> From:        Sharon Lucas/Austin/IBM
> To:        Tennis Smith <tennis_sm...@yahoo.com>
> Cc:        staf-users@lists.sourceforge.net
> Date:        07/18/2011 04:34 PM
> Subject:        Re: [staf-users] Debugging Jython In Stax
> ------------------------------
>
>
> I'm not sure what you mean by the "jython routines".  Please provide a STAX
> job that provides an example of  printing from "jython routines".
>
> Is the output being logged to the STAX JVM Log?  There's a link to view the
> STAX JVM Log via the STAX Job Monitor.
>
> --------------------------------------------------------------
> Sharon Lucas
> IBM Austin,   luc...@us.ibm.com
> (512) 286-7313 or Tieline 363-7313
>
>
>
>
>
> From:        Tennis Smith <tennis_sm...@yahoo.com>
> To:        staf-users@lists.sourceforge.net
> Date:        07/18/2011 02:41 PM
> Subject:        [staf-users] Debugging Jython In Stax
> ------------------------------
>
>
>
> Hi Guys,
> I have a jython file with several routines in it called from a stax xml
> file.   I think something is wrong with a string handler in the jython code,
> and would like to get some debug information about it.
>
> I changed the stax service definition in the staf.cfg file to the
> following:
>
> SERVICE STAX LIBRARY JSTAF EXECUTE
> {STAF/Config/STAFRoot}/services/stax/STAX.jar PARMS "PYTHONOUTPUT
> JobUserLogAndMsg CLEARLOGS Enabled PYTHONLOGLEVEL info" $
>
> I am getting good debug data from print statements in the <script> areas of
> my XML code. *But*, I am not getting any output from "print" that is
> anywhere in the jython routines.
>
> How can I get the jython code to print debug data?
>
> --
> Tks,
> -Tennis
> ------------------------------------------------------------------------------
>
> Storage Efficiency Calculator
> This modeling tool is based on patent-pending intellectual property that
> has been used successfully in hundreds of IBM storage optimization engage-
> ments, worldwide.  Store less, Store more with what you own, Move data to
> the right place. Try It Now!
> http://www.accelacomm.com/jaw/sfnl/114/51427378/
> _______________________________________________
>
> staf-users mailing list
> staf-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/staf-users
>
>


-- 
Tks,
-Tennis
------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to