我有我的命令行
傾銷日誌消息執行STAX文件
[[email protected] ~]# staf local STAX EXECUTE FILE "/root/test2.xml"
ARGS "{'command':'ls'}" WAIT RETURNRESULT
執行並得到下面的輸出XML文件(STAX)時安慰..
Response
--------
{
Job ID : 57
Start Date-Time: 20130405-18:27:13
End Date-Time : 20130405-18:27:13
Status : Normal
Result : 0
Job Log Errors : []
Testcase Totals: {
Tests : 0
Passes: 0
Fails : 0
}
}
腳本內容..
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="runCommand"/>
<function name="runCommand">
<function-list-args>
<function-required-arg name="command"/>
</function-list-args>
<try>
<sequence>
<script>print("This");</script>
<message>'%s %s: is a: %s' % (STAXCurrentTestcase, STAXCurrentFunction, command)</message>
<log>'test'</log>
<return>0</return>
</sequence>
<catch exception="'eTerminateFunction'" var="eInfo">
<sequence>
<log level="'fail'">'%s %s: Terminating function Error: %s' % (STAXCurrentTestcase, STAXCurrentFunction, eInfo)</log>
<tcstatus result="'fail'">eInfo</tcstatus>
<return>1</return>
</sequence>
</catch>
</try>
</function>
</stax>
怎麼會沒有記錄的傾倒過程中或執行之後安慰?
爲<log>
,<message>
或蟒蛇<script>print("This")</script>