The LOG service's DELETE request only deletes only one specified log file 
at a time.  However, you can create a small program or shell script to 
submit a LOG LIST request like:   STAF local LOG LIST MACHINE 
{STAF/Config/MachineNickname}  and then iterate through the result and 
submit the following request for each entry in the result whose log name 
begins with "STAX_Job_" (substituting the actual STAX job log name for 
<LogName>:
   STAF local LOG DELETE MACHINE {STAF/Config/MachineNickname} LOGNAME 
<LogName> CONFIRM

However, you can remove all the STAX job logs by using the FS service. The 
default LOG directory for your STAX logs will be 
{STAF/DataDir}/service/log/MACHINE/{STAF/Config/MachineNickname} unless 
you specified a different log directory default for the LOG service.  Note 
that the STAF variables in the directory name will be resolved when the 
LOG request is submitted.  You can confirm that this is the correct 
directory by first submitting the following request to list all of the 
STAX Job Logs:

STAF local FS LIST DIRECTORY 
{STAF/DataDir}/service/log/MACHINE/{STAF/Config/MachineNickname}/GLOBAL 
NAME STAX_Job_* EXT log TYPE F

Assuming this lists the STAX Job Logs that you want to delete, you can 
then delete all of the STAX job logs by using the FS service's DELETE 
request as follows:

STAF local FS DELETE ENTRY 
{STAF/DataDir}/service/log/MACHINE/{STAF/Config/MachineNickname}/GLOBAL 
NAME STAX_Job_* EXT log TYPE F CONFIRM

Note that if you specify the parameter CLEARLOGS Enabled when registering 
the STAX service in your STAF.cfg file, then the STAX Job and Job User 
logs will be deleted before a STAX job is executed to ensure that the logs 
only contain entries for this STAX job.  Since STAX job numbers are 
reused, a specific job log may contain the results for more than one job 
if you don't specify the CLEARLOGS Enabled parameter.  For example:

SERVICE STAX LIBRARY JSTAF EXECUTE C:\STAF\services\stax\STAX.jar \
             OPTION JVMName=STAX OPTION J2=-Xmx1024m \
             PARMS "CLEARLOGS Enabled"

--------------------------------------------------------------
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/16/2011 12:38 AM
Subject:        [staf-users] remove all logs



Hi,

How do you remove all stax logs without having to do them one by one? 

Is there an equivalent to listing all the files which removes them all? 

In other words, if this lists all log files:
    staf local log list machine mymachine

... what would remove all log files?


-- 
Tks,
-Tennis
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to