Skip to content

System_Logs

Cameron edited this page Jan 28, 2017 · 1 revision

title: System Logs permalink: /System_Logs/

Log Types

There are three separate logs in E107 2.0:

The admin log

The user log

The rolling log

They have distinct purposes.

In addition, there is the directory e107_files/logs, into which text-based log files may be written.

Admin Log

This log is to record the actions of system administrators.

In many cases there is no admin control over which events are logged; some plugins and core functions do provide the ability to control logging.

The level of detail varies according to the particular event (and how straightforward it was to add logging, in the case of existing code). For preferences, usually the changed values are logged. For other data there may be an array of values, or a few numbers. As a minimum, the existence of an entry in the admin log indicates that someone did something!

The API, which includes a number of 'helper' functions, is described on a API:Admin_Log separate page

User Log

This log is to record user-related events - signups, setting changes, login and log out.

The level of logging is controllable - the types of events which are logged can be selected, as well as the user class.

Rolling Log

This log is intended to record transient events - if enabled, older events are purged after a selected number of days. Certain core functions log information to the rolling log.

It is also useful for debugging, especially in circumstances where 'echo' statements will interfere with the programming flow.

Access Log

A simple text log file can be enabled, which logs every page access.

A separate file is generated for each day. These have to be deleted manually when no longer required.

The file is stored in the e107_files\logs directory - with the name 'logd_dd.yyyy.csv' - where 'dd' is the day number within the year (1 to 3 digits) and 'yyyy' is the year.

The file is in CSV ('comma separated variable') format, and can therefore be imported into many spreadsheet and database packages for analysis.

The information is largely that which can optionally be displayed at the bottom of each page.

Current fields (subject to change) are:

  • Date/time - as Unix integer time stamp
  • Date/time - in 'human-readable' format: yy-mm-dd hh:mm:ss
  • User IP address - note that this is in IPV6 format
  • Page and query part of the current access (site URL has been stripped)
  • Processing time - seconds
  • DB access time - as percentage of overall time
  • Number of DB queries executed
  • Memory used - if supported by the current PHP version, will show current and peak values.
Clone this wiki locally