error
log file, located in compass-
servername
/logs
in the server root directory, lists all the errors the server has encountered. The access log, located in compass-
servername
/logs
in the server root directory, records information about requests to the server and the responses from the server. You can use the Server Manager to specify what to include in the access
log file. Use the log analyzer to generate server statistics. You can back up server error and access log files by archiving them.
Active log files for resources and archived log files appear in the list.
The order of the log entries on the screen is the order in which they were
recorded in the log.
Case is important; make sure the case for your entry matches the case of the
word you're searching for. (For example, if you want to see only those
access log entries that contain "POST," type
POST
.)
wiley.a.com - - [16/Feb/1996:21:18:26 -0800] "GET / HTTP/1.0" 200 751Table 8.1 describes the last line of the sample access log.
wiley.a.com - - [17/Feb/1996:1:04:38 -0800] "GET /docs/grafx/icon.gif HTTP/1.0" 204 342
wiley.a.com - - [20/Feb/1996:4:36:53 -0800] "GET /help HTTP/1.0" 401 571
arrow.a.com - john [29/Mar/1996:4:36:53 -0800] "GET /help HTTP/1.0" 401 571
Table 8.1 The fields in the last line of the sample access log file
Here is an example of an access log using the flexible logging format:
wiley.a.com - - [25/Mar/1996:12:55:26 -0800] "GET /index.htm HTTP/1.0" "GET" "/?-" "HTTP/ 1.0" 304 0 - Mozilla/2.0 (WinNT; I)
The access log in the flexible logging format looks similar to the access log using the Common Logfile Format.
wiley.a.com - - [25/Mar/1996:12:55:26 -0800] "GET / HTTP/1.0" "GET" "/?-" "HTTP/1.0" 304 0 - Mozilla/2.0 (WinNT; I)
wiley.a.com - - [25/Mar/1996:12:55:26 -0800] "GET / HTTP/1.0" "GET" "/?-" "HTTP/1.0" 304 0 - Mozilla/2.0 (X11; I; IRIX 5.3 IP22) Viewing the Error Log File
The error log file contains errors the server has encountered since the log file was created; it also contains informational messages about the server, such as when the server was started. Incorrect user authentication is also recorded in the error log. Use the error log to find broken URL paths or missing files.
To view the error log file from the Server Manager:
The order of the log entries on the screen is the order in which they were
recorded in the log.
Case is important; make sure the case for your entry matches the case of the
word you're searching for. (For example, if you want to see only those error
messages that contain "warning," type
warning
.)
[13/Feb/1996:16:56:51] info: successful server startupIn this example, the first line is an informational message--the server started up successfully. The second log entry shows that the client
[20/Mar/1996 19:08:52] warning: for host wiley.a.com trying to GET /report.html, append-trailer reports: error opening /usr/ns-home/docs/report.html (No such file or directory)
[30/Mar/1996 15:05:43] security: for host arrow.a.com trying to GET /, basic-ncsa reports: user jane password did not match database /usr/ns-home/authdb/mktgdb
wiley.a.com
requested the file report.html
, but the file wasn't in the primary document directory on the server. The third log entry shows that the password entered for the user jane
was incorrect.
access
was created for the server. You can customize access logging for any resource by specifying whether to log accesses, what format to use for logging, and whether the server should spend time looking up the domain names of clients when they access a resource.
Server access logs can be in Common Logfile Format, or flexible log format, or your own customizable format. The Common Logfile Format is a commonly supported format that provides a fixed amount of information about the server. The flexible log format allows you to choose (from the Server Manager) what to log. A customizable format uses parameter blocks that you specify to control what gets logged. Once an access log for a resource has been created, you can't change its format unless you archive it or create a new access log file for the resource.
To set access logging preferences:
As a default, the log files are kept in the
logs
directory in the server root
directory. If you specify a partial pathname, the server assumes the path is
the logs
directory in the server root.
http://www.a.com:8080/special/docs
, the URI is /special/docs
.http://www.a.com:8080/special/docs?find_this
, the query string of the URI is find_this
.If you choose a custom format, type your custom format in the Custom format field. For more information about the parameters you should use, see Netscape's DevEdge online documentation web site at
http://developer.netscape.com/docs/manuals/ index.html
.
Type a wildcard pattern of hosts the server should ignore when recording
accesses. For example, use
*.netscape.com
if you don't want to log
accesses from people whose domain is netscape.com
. You can type
wildcard patterns for hostnames, IP addresses, or both.
If you are using the proxy server's log analyzer, you should include a
format string. If you are using a third-party analyzer, you may not want to
include a format string in your logfile.
access
might become access.24Apr-04AM
.
You can archive log files immediately or have the server archive log files at a specific time on specific days. The information about when to archive log files is stored in the cron.conf
file in the admin-serv
directory in the server root directory; the server's cron configuration options are stored in ns-cron.conf
in the admin-serv
directory.
Note
Before running the log analyzer, you should archive the server logs.
To archive log files:
If you want archiving to occur at specific times on specific days, click the
"Rotate log at" button, choose a time from the pull-down menu, and select
the days for archiving to occur.
To monitor your server from the Server Manager:
Last Updated: 02/12/98 13:36:17
Any sample code included above is provided for your use on an "AS IS" basis, under the Netscape License Agreement - Terms of Use