Portal log files
You can configure portal logging to:
- log output for portal processes in a single file
- log output for each portal process in a separate file
- create and switch the logging to a new log file at the end of each day
You can control the shared logging and/or cycling of logs by setting the variables described in the section Portal Logging Variables on page 1-12. Note that the portal only logs activity if debug is set on.
| OS | To set debug ON |
|---|---|
| Windows | Set XYV_PRTL_DEBUGto a portal debug value. Set in the registry in the path |
| Unix | Run the portal with the -d switch; set the switch to a portal debug value, for example: PcmPortal -s -S6050 -d1. —or— Set XYV_PRTL_DEBUGto a portal debug value. |
Portal logging variables
Set the following variables in the UNIX environment.
Set in the registry under
Note that by default the variables are not set which results in the behavior of the logging options being OFF unless specifically set to ON (1) as described below.
| Variable | Description |
|---|---|
| XYV_LOG_PER_PID | Set to 1 (ON) to indicate the creation of a separate log file for each forked portal process. |
| XYV_LOG_PER_PORT | Set to 1 (ON) to indicate the creation of a separate log file for each portal socket number. |
| XYV_LOG_CYCLE | Set to 1 (ON) to indicate the creation of a new log file at midnight for each running portal. |
Logfile Naming
The logfile naming convention is described below.
| OS | Logfile Naming Convention |
|---|---|
| Windows | Log_dir/Portal_socknum_YYYYMMDD_HHMM_pid.txt |
| UNIX | Log_dir/Portal_socknum_YYYYMMDD_HHMM_pid.log |
The following variables affect the logfile naming convention described above.
| Logfile Name Component | Controlling Variable |
|---|---|
| Log_dir | Set XYE_PRTL_LOG_DIR to the directory path where you want the portal to write the log files. Do not set XYE_PRTL_LOGFILE or use -log in the command when starting the portal. |
| Portal .txt .log | The XYV_PDM_LOGFILE (character string) value can be set to the PortalPrefix or filename and file extension. For example, MyPortal.log designates the use of MyPortal as the PortalPretix and .log as the filename extension. This variable is optional. If not set: The default PortalPrefix is Portal. The default filename extension on Windows is .txt The default filename extension on UNIX is .log |
| Logfile Name Component | Controlling Variable |
|---|---|
| socknum | If XYV_LOG_PER_PORT is set to 1 the socket number (PcmPortal number) is included in the filename. |
| YYYYMMDD | If eitherXYV_LOG_CYCLE or XYV_LOG_PER_PID is set to 1 the four-digit-year, two-digit-month and two-digit-day that the portal was started is included in the filename. |
| HHMM_pid | If XYV_LOG_PER_PID is set to 1, the two-digit-hour and two digit-minute that the portal was started, and the process-id is included in the filename. |