Skip Navigation
Expand
Adding custom logging to your customizations
Answer ID 9897   |   Last Review Date 05/19/2022

How and where should I produce log files for my customizations?

Environment:

Customizations, Process Designer, Custom Process Model (CPM), Service Process Model (SPM)

Issue:

I would like to produce logging from my customizations, including Custom Process Model (CPM) customizations, custom PHP scripts, or otherwise.

Resolution:

Please see the attachments to this answer for example code for producing custom logging from a CPM customization (SimpleIncidentCPM.php), and for an example script for use in accessing the logs produced. For further details see

Answer ID 12194:  Using the /tmp Directory to Store Log Files

The same logging code can be used from PHP custom scripts. Similarly, with the use of a custom script, any customization can produce logs in a similar way to what is described in the example provided. In such a case (.NET or a Browser UI Extension, for example), the custom script would be called directly (using a URL similar to what is described in the log_file_manager.php attachment) to produce the logs. 

Also, be aware that there is a CPM logging solution available in the product for sites with Cloud Auxiliary Storage Service (CASS) enabled. This solution is described in the product documentation here. For further details on CPM logging see

Answer ID 11473: CPM logging record retention

Answer ID 12066: CPM logging record delays in Probe Designer