LogFile

Why Is This Important?

This directive allows you to rename the default EZproxy log from ezproxy.log to refine how EZproxy collects and stores use data.

By assigning a new name using this directive, either a simple name such as ezp.log or a more specific directory and path such as d:\log\ezp.log, you can name and store the log files in a way that is meaningful to you and your institution.

Including additional refining values in the name along with the -strftime qualifier allows you to sort the log information into more specific files, creating daily or weekly files to use for analysis of smaller windows of time than the default monthly log. These date-specific names can help you to more quickly identify security or troubleshooting issues because you can focus on a file containing data logged over a restricted time period when you know a problem occurred.

LogFile is a position-independent config.txt directive that can be used to customize the name of your EZproxy log file. In the absence of this directive, EZproxy records this information to a file named ezproxy.log in the EZproxy installation directory.

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

LogFile supports an extended format that commands EZproxy to create log files named with the date they were created, rotating them as defined by the date format you include. The following example would create daily log files:

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

LogFile Qualifiers

The following table provides details about the qualifiers and values that can be used to customize the frequency with which EZproxy generates individual log files, what they are named, and where they are placed.

Qualifier/Value Description
-strftime This qualifier indicates that the filename may contain special sequences representing parts of the current date and time.
%Y This value can be entered as a part of the log file name to pull data from the current year and include the year in the filename. (This value is usually used in combination with either month and day OR week to refine the data in the file.)
%m This value can be entered as part of the log file name to pull data monthly and include the two-digit month in the filename. (This value is usually used in combination with year and day to refine the data in the file.)
%d This value can be entered as part of the LogFile configuration line to pull data daily (when combined with the year and month values) and include the two-digit day in the filename.
(This value is usually used in combination with year and month to refine the data in the file.)
%w This value can be entered as part of the LogFile configuration line to pull data weekly (when combined with the year value) and include the two-digit week of the year in the filename. (This value is usually used in combination with year to refine the data in the file.)

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 components or value options, please contact support@oclc.org for help with your standalone EZproxy configurations and hostedezp@oclc.org to set up your Hosted EZproxy configurations.

 

 

The following table provides first a result you may want to achieve and then the directive line that you should enter in your config.txt file to produce that result.

Desired Result config.txt directive
You would like to rename your EZproxy log file ezp.log LogFile ezp.log
You would like to rename your EZproxy log file ezp.log and store it in a specific directory LogFile d:\log\ezp.log
You would like EZproxy to create weekly EZproxy log files (storing use information in files labeled by week)
LogFile -strftime ezp%y%W.log
You would like EZproxy to create daily EZproxy log files (storing use information in files labeled by date)
LogFile -strftime ezp%Y%m%d.log 
You would like EZproxy to create daily EZproxy log files and store them in a specific directory
LogFile -strftime d:\log\ezp%Y%m%d.log
 

The following directives interact with or control functions related to this directive:

LogFilter
LogFormat
LogSPU
Option LogSession
Option LogUser