Tuesday, March 8, 2016

Thick Client Event Logging

There are surprisingly few blog posts out there about vanilla options for logging in the thick client.  Perhaps this is because everyone knows how to do it and if so feel free to ignore this.  But perhaps it is because most people just struggle through using inefficient methodologies.

Here is a simple tip for troubleshooting when using the thick client.  There is an OS environment variable called SIEBEL_LOG_EVENTS (if it does not exist you can create it). Many developers know how to set this to an integer between 0 and 5, but values of 4 and 5 where good detail is provided create a file that unreasonably large and hard to parse.  When troubleshooting on the thin client you can set individual event log levels from the Administration - Server Configuration screen, component events view.  You can do the same when using a thick client though you need to do it using the SIEBEL_LOG_EVENTS variable.  You can use any combination of event aliases and levels, but the value I have found useful is the following:
StpExec=4,PrcExec=4,ObjMgrSqlLog=4,SQLParseAndExecute=4,ObjMgrBusServiceLog=4,EventContext=4,ProcessRequest=4,ObjMgrDBConnLog=5,SecAdpLog=5,ObjMgrSessionLog=5,ObjMgrBusCompLog=2
Basically you can enter any comma separated list of event aliases.

One coda is that if I were trying to troubleshoot a WF issue, I could open this log and do a find for the word 'Instantiating'.  The first instance I would find is the Start step of the WF Process followed by the values of the process properties being set by that step:
PrcExec Create 4 00000002569f1a98:0 2016-01-20 15:31:33 Instantiating process definition 'PPT Passport History Response Integration'.
PrcExec PropSet 4 00000002569f1a98:0 2016-01-20 15:31:33 Setting runtime value of property 'Namespace: 'USER' Name: 'ConfigItem' Datatype: 'String'' to:
PrcExec PropSet 4 00000002569f1a98:0 2016-01-20 15:31:33 Start
PrcExec PropSet 4 00000002569f1a98:0 2016-01-20 15:31:33 Setting runtime value of property 'Namespace: 'USER' Name: 'ObjectName' Datatype: 'String'' to:
PrcExec PropSet 4 00000002569f1a98:0 2016-01-20 15:31:33 Workflow - PPT Test Error Process
PrcExec PropSet 4 00000002569f1a98:0 2016-01-20 15:31:33 Setting runtime value of property 'Namespace: 'USER' Name: 'CurrentStep' Datatype: 'String'' to:
PrcExec PropSet 4 00000002569f1a98:0 2016-01-20 15:31:33 Convert Siebel Message PPH
Subsequent occurrences look like this:
StpExec Create 4 00000002569f1a98:0 2016-01-20 15:31:33 Instantiating step definition 'Start'.
StpExec End 4 00000002569f1a98:0 2016-01-20 15:31:33 Stopping step instance of 'Start' with a 'Completed' status.
In this way you can step through the WF.  The advantage of this logging level over say looking at the WF Instance Monitor or only using WF Simulator, is you will be able to see the SQL executed and the bind variables used, what BCs were instantiated along the way, and what BS methods might have been called.