LogFile is a position-independent config.txt/ezproxy.cfg directive that specifes the name of the file in which the URLs accessed by EZproxy users should be stored. In the absence of this directive, EZproxy records this information to a file named ezproxy.log in the directory where EZproxy is installed.

Basic format

The basic format for LogFile is:

LogFile ezp.log

where ezp.log can be replaced by any valid filename. This filename can include directory path information, such as:

LogFile d:\log\ezp.log
LogFile /var/log/ezp.log

Extended format

Starting with EZproxy 3.2a GA (2005-03-28), LogFile supports an extended format. In this extended format, you can specify that EZproxy should substitute current date and time information into the name of the file used for logging. For example, to change log files daily, use:

LogFile -strftime ezp%Y%m%d.log

The -strftime qualifier indicates that the filename may contain special sequences representing parts of the current date and time. The most common values to use in the filename are %Y for the current four-digit year, %m for the current two-digit month, %d for the current two-digit day of the month, and %W for the two-digit week of the year. In the above example, on January 3, 2008, EZproxy would record entries to ezp20080103.log.

To change log files every week, use:

LogFile -strftime ezp%Y%W.log

To change log files every month, use:

LogFile -strftime ezp%Y%m.log

Like the basic format, the extended format can also accept directory path information, such as:

LogFile -strftime d:\log\ezp%Y%m%d.log
LogFile -strftime /var/log/ezp%Y%m%d.log

Beyond %Y, %m, %d, and %W, your operating system may support additional options to insert other components of the current date and time. If you have any questions about including other information, please contact support@oclc.org for help.

See also