Maintenance utilities > Audit Manager
combine_audit_files
Note This utility is deprecated and will be removed in a future version. Combines all the log files into an TcAuditLog.txt or TcAuditLog.xml file. Syntax combine_audit_files.pl Arguments source_dir Specifies the source directory containing audit log files generated during Teamcenter sessions. target_dir Specifies the target directory containing the combined audit log file. The target directory must not be the same as the source directory, because the program tries to move the audit files from the source directory to the target directory, combine them, and delete them. The source_dir and target_dir values can be either an absolute path or a relative path. Environment This utility works on any Linux or Windows platforms that install Perl, and the program is in their path. Files The audit log files to be combined (tc_auditlog_****.txt, tc_auditlog_****.xml) are at source_dir directory. The combined master log files (TcAuditLog.txt, TcAuditLog.xml) are at target_dir directory. If the master files TcAuditLog.txt, TcAuditLog.xml are not found when running this utility, first create them, then append the original audit files to them. Restrictions None. Examples Suppose the utility combine_audit_files.pl and all original audit files are in the current directory, and the master audit files are in the C:\temp\audit directory. The program searches all tc_auditlog_****.xml and tc_auditlog_****.txt files, moves them to the C:\temp\audit directory, combines them, and appends them to the TcAuditLog.xml and TcAuditLog.txt files in the C:\temp\audit directory. Finally, all the original audit files that are moved and appended are deleted. Copy perl combine_audit_files.pl . C:\temp\audit Here, source and target are subdirectories of the current directory. Suppose the utility program is in the current directory, original audit files are in the source directory, and the master audit files are in the target directory. It will look for all tc_auditlog_****.txt and tc_auditlog_****.xml files in the source directory, move them to the target directory, combine them, and append them to the TcAuditLog.txt and TcAuditLog.xml files in the target directory. Finally, all original audit files that are moved and appended are deleted. In general, all audit files are generated by the program and you should not manually edit them. However, in the following situations, you must manually modify the master files using any text editor, such as vi or Notepad: Copy perl combine_audit_files.pl source target If the TC_audit_delimiter preference is changed to a value other than the default value (^), you must manually edit the first line of the TcAuditLog.txt master audit file to reflect the new delimiter. For example, if the new delimiter is a dollar sign ($), the first line of the TcAuditLog.txt file must be changed to: Copy ObjectUID$objectId$objectName$revision$objectTypeName$ eventTypeName$userId$loggedDate$properties If the TC_XML_ENCODING environment variable in the tc_profilevars.bat file is changed to a value other than the default value iso-8859-1, you must edit the first line of the TcAuditLog.xml master audit file and the TcAuditLog.xsl and TcAuditLogSchema.xsd files in the sample/audit directory. For example, if the new encoding is Shift_JIS (Japanese), the first line of the TcAuditLog.xml file is changed to: Copy Siemens Digital Industries Software recommends that you run this utility and archive the master audit file periodically, daily, weekly, or monthly, depending upon the data growth. If the master file grows too big it would be difficult to open. A sample of the XML program files is provided in the sample/audit/ directory to view the XML audit data in the web browser. The four files (TcAuditLog.xml, TcAuditLog.xsl, TcAuditLogSchema.xml, and TcAuditLog.js) must be in the same directory. Opening TcAuditLog.xml in Microsoft Internet Explorer 5.5 or higher presents audit data in a table similar to the following that can be sorted and filtered by column. Audit data table The files are described as follows: TcAuditLog.xml XML data source of audit records. The file is produced by executing the combine_audit_files.pl script. TcAuditLog.xsl XML style sheet for displaying the TcAuditLog.xml file in the Microsoft Internet Explorer Web browser. TcAuditLogSchema.xsd XML schema for defining XML data structure and data types. TcAuditLog.js JavaScript for adding dynamic effects to the HTML presentation. If you use the TcAuditLog.xml for purposes other than displaying the audit log on a Web browser, you can modify any of the files. For example, you can modify the TcAuditLog.xml file so that the style sheet or schema is not loaded. None of the files introduced in this section (combine_audit_files.pl, TcAuditLog.xml, TcAuditLog.xsl, TcAuditLogSchema.xsd, and TcAuditLog.js) require a Teamcenter environment. You can run them anywhere as long as you have Perl and Microsoft Internet Explorer. Related Topics Audit Logs Management
Source: https://docs.sw.siemens.com/documentation/external/PL20251212545240207/en-US/tc_help/utilities_reference/mna1737253705286/svn1737253705693/combine_audit_files.html · retrieved Fri Jul 31 2026 00:00:00 GMT+0000 (Coordinated Universal Time)