T4S4  18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
LOG file handling

Functions

 getBinLogFile logchannel target zip
 This function download a binary logfile from the BGS server and store this in the local filesystem. More...
 
 storeBinLogFile src logchannel
 This function upload a binary logfile to the BGS server. More...
 
 testLogPattern logchannel pattern
 Test the last line of a logfile for a keyword. More...
 

Detailed Description

Function Documentation

◆ getBinLogFile()

getBinLogFile   logchannel target zip  

This function download a binary logfile from the BGS server and store this in the local filesystem.

Parameters
logchannel: the relative path to the logfile
target: the file name in the local file system
zip: (optional) "zip" compress the download
Returns
0= ok 1=error

download the logfile /sys/nihil/BGS_20120717-043049/tpbgs64_netd.log and store the compressed content in the file test.log.

1 ::LogTools::getBinLogFile /sys/nihil/BGS_20120717-043049/tpbgs64_netd.log test.log zip

References tpco_closeSrvSession(), tpco_connectTo(), tpco_filedelete(), tpco_getTPFSFile(), tpco_packfile(), tpco_renamefile(), and tpwrite().

◆ storeBinLogFile()

storeBinLogFile   src logchannel  

This function upload a binary logfile to the BGS server.

Parameters
src: the file name in the local file system
logchannel: the relative path to the logfile
Returns
0= ok 1=error

upload the logfile test.log to the BGS server (/tmp/test.log).

1 ::LogTools::storeBinLogFile test.log /tmp/test.log

References tpco_closeSrvSession(), tpco_connectTo(), tpco_filedelete(), tpco_putTPFSFile(), tpco_unpackfile(), and tpwrite().

◆ testLogPattern()

testLogPattern   logchannel pattern  

Test the last line of a logfile for a keyword.

Parameters
logchannel: the relative path to the logfile
pattern: TCL string pattern (keyword)
Returns
1= exists 0=not exists

Test, if the last logile in the logfile /sys/nihil/BGS_20120717-043049/tpbgs64_netd.log contains the pattern "*TEST*"

1 ::LogTools::testLogPattern /sys/nihil/BGS_20120717-043049/tpbgs64_netd.log *TEST*

References tpco_closeSrvSession(), tpco_connectTo(), and tpwrite().