WriteToLog

Mon 01 January 2018

Syntax

WriteToLog(AppFenceSetting, String)

Description

Use the WriteToLog function to write String to either the application server or the TraceSQL log file.

The WriteToLog function writes String to the TraceSQL log file if AppFenceSetting is less than or equal to the current application log fence (AppLogFence) setting in the application server configuration file (PSAPPSRV.CFG.)

Note: This is distinct from the PeopleTools LogFence capability which applies to PeopleTools level logging.

The WriteToLog function writes String to the TraceSQL log file in PSAPPSRV.CFG if any of the following trace options is turned on.

  • TracePPR

  • TraceSQL

  • TracePC

  • TracePIA

If any change is made to the trace options in PSAPPSRV.CFG, you must restart both the application server and web server so that the change takes effect.

The debugging options for a Web Profile also affects the WriteToLog function. If any of the following page fields are selected (checked), the WriteToLog function writes String to the TraceSQL log file.

  • Show Layout

  • Show Overlapping Fields

  • Show Stylesheet Inline HTML

  • Show JavaScript Inline HTML

  • Generate HTML for Testing

  • Create File from PIA HTML Page

If the above conditions are not true, the WriteToLog function writes String to the application server log file.

Parameters

Field or Control

Definition

AppFenceSetting

Specify the level at which logging should occur, if AppFenceSetting is less than or equal to the current application log fence. You can use either a number or a constant value. The values are:

Value

Description

%ApplicationLogFence_Error

Allow all levels of errors to be written to the log. This is the lowest setting.

%ApplicationLogFence_ Warning

Allowing only warnings or higher to be written to the log.

%ApplicationLogFence_ Level1

Allow only this level of errors or higher to be written to the log.

%ApplicationLogFence_ Level2

Allow only this level of errors or higher to be written to the log.

%ApplicationLogFence_ Level3

Allow only this level of errors to be written to the log.

Field or Control

Definition

String

Specify the message text to be written to the log file.

Returns

None.