Using Application Logging
Application logging enables you to do error logging using an independent application log fence mechanism. It also enables you to write to the PeopleTools log using the WriteToLog built-in function.
Note:
This is an application log fence, and it is distinct from the PeopleTools LogFence setting.
In PeopleTools, a log fence is a type of barrier. Application error messages are only written to the PeopleTools log if the log fence setting that the messages are written to the log with (using WriteToLog) is less than or equal to the current application log fence setting (AppLogFence) in the application server configuration file (PSAPPSRV.CFG ).
For example if the AppLogFence setting is 2, only messages written using the WriteToLog function with a log fence value less than or equal to 2 will be written. This allows you to have application logging code written in your application that will only be in effect if the log fence setting permits.
The application log fence setting is available through the system variable %ApplicationLogFence.
Apart from the obvious use of allowing the application to write to the Tools log file, this mechanism is also an aid in debugging. For example, you could interleave PeopleCode, SQL, and application level tracing in the same log file to easily correlate application and PeopleTools actions.