T4S4  19.1 C8408 A23185
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...
 
 incrLogChannelSCTX LogChannel SecurityContext
 Increases the secure context of a LogChannel. 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
logchannelthe relative path to the logfile
targetthe 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().

◆ incrLogChannelSCTX()

incrLogChannelSCTX   LogChannel SecurityContext  

Increases the secure context of a LogChannel.

Parameters
LogChannelthe log channel path
SecurityContextthe new security context of the log channel (UNRESTRICTED, RESTRICTED, CONFIDENTIAL, STRICTLYCONFIDENTIAL)
Returns
nothing or exeption

It is only possible to increase the security context. It has no effect if the security context of the log channel is STRICTLYCONFIDENTIAL and the parameter SecurityContext is UNRESTRICTED.

1 ::LogTools::incrLogChannelSCTX /tmp/test.log STRICTLYCONFIDENTIAL

◆ storeBinLogFile()

storeBinLogFile   src logchannel  

This function upload a binary logfile to the BGS server.

Parameters
srcthe file name in the local file system
logchannelthe 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
logchannelthe relative path to the logfile
patternTCL 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().