This section discusses how log files are created. The section includes the following topics:
On both the UNIX and Windows platforms, logs from the administration server are collected in the administration server https-admserve/logs/ directory. Logs from server instances are collected in the https-server_name/logs/ directory.
You can set the default log level for the entire server. Redirect the stdout and the stderr to the server’s event log and direct the log output to the operating system’s system log. Additionally, you can direct the stdout and the stderr content to the server’s event log. Log messages by default are sent to stderr in addition to the specified server log file.
Another feature available is to log the virtual server ID with the log message. This is a useful feature when multiple virtual servers are used to log messages to the same log file. You can choose to write the log messages to system log. When you do so, logging is not performed on the error log file. Instead the syslog logging service on UNIX, or the system logging service on Windows platform is used to produce and manage logs.
You can also use the server.xml attributes to control the contents of this file. For details on the server.xml file, see the Sun Java System Web Server 6.1 SP9 Administrator’s Configuration File Reference.
For stable operational environments where centralized logging is required syslog is appropriate. For environments where log output is frequently required for diagnostics and debugging, individual server instance or virtual server logs may be more manageable.
All logged data for the server instance and administration server in one file may prove difficult to read and debug. It is recommended that you use the syslog master log file only for deployed applications that are running smoothly.
Logged message are intermixed with all other logs from the Solaris daemon applications.
By using the syslog log file, in conjunction with the syslogd, and the system log daemon, you can configure the syslog.conf file to:
Log messages to the appropriate system log
Write messages to the system console
Forward logged messages to a list of users, or forward logged messages to another the syslogd on another host over the network
Since logging to the syslog means, logs from Sun Java System Web Server, and other daemon applications are collected in the same file, logged messages are enhanced with the following information to identify Sun Java System Web Server-specific messages from the particular server or virtual server instance:
Unique message ID
Program name (webservd or webserv-wdog)
Process ID (PID of the webserv process)
Thread ID (optional)
The LOG element can be configured for both the administration server and the server instance in the server.xml file.
For more information on the syslog logging mechanism used in the UNIX operating environment, use the following man commands at a terminal prompt:
man syslog man syslogd man syslog.conf
For more information on the event log mechanism used in the Windows operating environment, refer to the Windows help system index for the keywords Event Logging.