Siebel logs provide a whole lot of information to debug application issues. Although invaluable, they fall short in one aspect – scripting.
When you have complex eScripts in your application, you’ll find it difficult to write new scripts on top of them as well as debug any of the existing scripts. Yes, you can certainly map back the script statements to Siebel operations performed and documented in the log file, but it is far easier to have your own log statements and understand what exactly is going on.
This is made possible by Trace.
You need to explicitly turn on tracing for Siebel scripts. You would then have two explicitly provide trace statements wherever you need to see something along to the trace file. It is recommended also to turn off the tracing in in your own script.
TheApplication().TraceOn("c:\\temp.txt", "Allocation", "All"); // the world rotates, universe scoffs at earthlings, stuff happens // of course, trace happens as well TheApplication().TraceOff();
is a typical statement that you seek to turn on/off tracing.
While turning on tracing, you can track memory allocation (e.g. BC crated/destroyed) by specifying “Allocation” as the second argument. You can change it to “SQL” to just trace SQLs.
Similarly, the third argument can specify without a trace Scripting objects (“Script”), OLE objects (“OLE”, who uses this any more?), or everything (“All”).
You can turn on tracing in any scripts – at the Applet level, BC or from Business Service. Once turned on trays will not only log your custom trace statements, but also the objects created/used/destroyed across any BC, BO, Applet, Business Service employed by the Siebel operations until trace is again turned off.
The typical trace file looks like this-
02/23/15,13:12:37,START,22.214.171.124  LANG_INDEPENDENT,TSMYTHE,9152,7656 02/23/15,13:12:37,ALLOC,1,BusObject,Opportunity,Script 02/23/15,13:12:37,ALLOC,2,BusComp,Opportunity,Script 02/23/15,13:12:37,COMMENT,>> Querying opty for 8SIA-7H41H 02/23/15,13:12:37,COMMENT,>> Found Opty. Updating fields.
Did I mention that you have to turn on tracing through Siebel scripts explicitly? I Did that just to test your patience. You can turn on or turn of tracing dynamically as well.
The premise of that is simple – catch hold of a running session, and ask Siebel to start tracing.
You can also do that manually if you don’t like the look of the UI I designed – although I’ll be a bit hurt by your decision.