Tracing
The PPJ Framework starting from version 2010 has been instrumented with a granular system of trace calls (we will fine tune it and improve the location and details of the trace calls in future builds and major version releases.)
There are seven trace sources defined in the PPJ Framework:
SQL
Windows
TableWindows
Files
Reports
System
Application
Each source can be set to one of 4 different levels:
Off (Default) = 0
Error = 1
Warning = 2
Info = 3
Verbose = 4
Enable tracing in {app}.exe.config
To enable tracing in the application's configuration file you can edit it with a text editor or by using our configuration tool. In this case the application needs to be restarted.
Enable Tracing at Runtime
Tracing can be enabled programmatically at any time by simply changing the TraceLevel assigned to the trace source.
For example, to enable SQL tracing at runtime use the following code:
Trace Sources
In the following table you can find a description of the kind of activity that is traced for each switch.
Source | Description |
---|---|
SQL | SQL operations, including parsing, execution, fetching data, exceptions. |
Windows | SAL and Windows events. |
TableWindows | Table Windows operations, including populating, creating rows, columns, etc. |
Files | All files operation and exceptions. |
Reports | Reporting operations including loading a report, input variables parsing and binding, printing viewing, and errors. |
System | System events, including startup, shutdown, SalCompileAndEvaluare and bind variables resolution and read/write operations, unhandled exceptions, etc. |
Application | Application's generated traces. |
Last updated