The STAX job logs are STAF logs that can be queried using the STAF Log 
service's QUERY request.  Detailed information is provided in subsections 
"Querying STAX Job Logs" and "Querying STAX Job User Logs" in section 
"STAX Logging" in the STAX User's Guide at 
http://staf.sourceforge.net/current/STAX/staxug.html#Header_StaxLogging.

For example, if submitted from the STAX service machine (specify the STAX 
job ID in the log name that you want to query):

STAF local LOG QUERY MACHINE {STAF/Config/MachineNickname} LOGNAME 
STAX_Job_1
STAF local LOG QUERY MACHINE {STAF/Config/MachineNickname} LOGNAME 
STAX_Job_1_User

You can use the STAF APIs provided for submitting a STAF command via 
C++/Java/Perl/Python/Tcl or use a <stafcmd> in a STAX job or submit via a 
shell script or .bat file.

The log contents are returned as marshalled data in the result string (as 
talked about in the Results section for the Log Service in the STAF Users 
Guide).  You can  use the STAF APIs provided to format the marshalled data 
into a readable format (this is not specific to a LOG QUERY request) in 
whatever language you choose and then you can write the formatted string 
output to a file.  Or if you use STAF.exe  via the command line, a shell 
script, or a .bat file.  STAF.exe automatically unmarshalls and formats 
the result for you and you can redirect its output to a file.  For 
example:

STAF local LOG QUERY MACHINE {STAF/Config/MachineNickname} LOGNAME 
STAX_Job_1 > C:/temp/job1.txt

Or, you can use the FmtLog utility provided by STAF.  This is discussed in 
section "Format Log Utility" in the STAF User's Guide at 
http://staf.sourceforge.net/current/STAFUG.htm#HDRFMTLOG

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




Sangram Bakshi <san...@gmail.com> 
04/05/2010 11:09 AM

To
staf-users@lists.sourceforge.net
cc

Subject
[staf-users] How to use STAF apis to access staf job id related Logs






Hi ,
 
I have a staf job written , where i have logs mentioned , which come up on 
the STAX Monitor.
I would like write  a program using c/java/perl whatever STAF supports 
. In this program  i would like to
access the logs generated while running the STAF jobs. I want to access 
these logs and direct them to a file.
 
 
Please do suggest if this can be achieved through any STAF apis available 
.
 
Regards
Sangram
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to