ns_accesslog

Name

ns_accesslog -- Work with the access log

Syntax

ns_accesslog file

ns_accesslog roll ?file?

Description

ns_accesslog file returns the full filesystem path to the current access log.

ns_accesslog roll rolls the access log file immediately, incrementing the numbered extensions of the previous access logs in the process, and opening a new access log.

AOLserver logs http connections to an access log file. The access log filename and roll parameters are configured in the ns/server/${servername}/module/nslog section of the nsd.tcl file. Normally the access log will be rolled at a scheduled time, and the backup access logs will have their extensions incremented in the process.

Using ns_accesslog, you can retrieve the full filesystem pathname to the access log, roll the log file immediately, or roll the log file immediately to another named file. Rolling the access log closes the log file, renames it, and then opens a new access log file.

If ns_accesslog is passed a filename, then the current access log will be closed and renamed to the given filename and a new access log will be opened; none of the previous access log files will have their numbered extensions changed.

Relative pathnames are considered relative to the AOLserver installation directory. Absolute pathnames must include all of the path components to the AOLserver installation directory.

If the filename you specify points to the current access log file, the access log will be rolled (even though the error message states that it could not be), but a new access log will not be opened. Just don't do this.

In all cases the filename of the newly opened access log will be that which is configured in the nsd.tcl file.