# System Logs

## Introduction

There are different *System Logs* in e107:

| System Log                  | Description                                                                                        |
| --------------------------- | -------------------------------------------------------------------------------------------------- |
| [Admin Log](#admin-log)     | This log is to record actions of system administrators                                             |
| [User Audit Log](#user-log) | This log is to record user-related events - such as signups, setting changes, logins and log outs. |
| [Rolling Log](#rolling-log) | This log is intended to record transient events.                                                   |
| [Access Log](#access-log)   | If enabled, text-based (CSV) log files are saved of every page access on daily basis               |

## 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!

{% hint style="info" %}
**Developers** can use the *Admin Log* to store information about their plugin or theme. See :point\_right:  <https://devguide.e107.org/classes-and-methods/logging> for more information
{% endhint %}

## User Audit Log

This log is to record user-related events - such as signups, setting changes, logins and log outs.

The level of logging is controllable. In the *Preference* section, you can select the types of events which are logged, as well as for which [user class](https://userguide.e107.org/administration/users/user-classes).

## 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.

{% hint style="info" %}
It is also useful for :point\_right: [debugging and problem solving](https://devguide.e107.org/getting-started/debugging-and-problem-solving) for **developers.**
{% endhint %}

## Access Log

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

{% hint style="info" %}
This setting can be found in Admin Area > Settings > Preferences > Advanced Features > [**Log all page accesses**](https://userguide.e107.org/settings/preferences#log-all-page-accesses)
{% endhint %}

A separate file is generated for each day. The file is stored in the [`e107_system/(hash)/logs`](https://userguide.e107.org/installation-and-maintenance/folders-files-hash) directory - with the name 'logd\_ddd.yyyy.csv' - where *'ddd*' 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.

{% hint style="warning" %}
These files have to be deleted manually when no longer required!
{% endhint %}

The fields that are stored in the log file are:

| Field name     | Description                                             |
| -------------- | ------------------------------------------------------- |
| Unix time      | Timestamp in UNIX format                                |
| Date/Time      | Timestamp in 'human-readable' format: yy-mm-dd hh:mm:ss |
| IP             | Using IPv6 format                                       |
| URL            | Page and query part of the current access               |
| RenderTime     | Processing time in seconds                              |
| DBTime         | Database access time as percentage of overall time      |
| Qrys           | Number of database queries executed                     |
| Memory-Usage   | Shows current and peak values                           |
| User-Agent     | Shows the user agent (browser etc.) that was used       |
| Request-Method | Show the request method                                 |

{% hint style="info" %}
**TIP:** The above information can also be displayed on your website by enabling the setting in Admin Area > Settings > Preferences > [**Display Information**](https://userguide.e107.org/settings/preferences#display-information)
{% endhint %}
