# Configuration

## Configuration

Event monitoring can be configured by modifying `Server.xml` or through the Web Console.

### Configuration using Server.xml

To enable event monitoring, add the relevant settings to `Server.xml`.

```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Server version="8">

 <Monitoring>
    <Events>
      <Level>info</Level>
      <Log>
        <Enabled>true</Enabled>
        <Path>/var/log/ovenmediaengine</Path>
      </Log>
    </Events>
  </Monitoring>

</Server>
```

<table><thead><tr><th width="204">Parameter</th><th width="99">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>&#x3C;Events>&#x3C;Level></code></td><td>N</td><td>Event logs have different levels according to operations. Configurable values are <code>trace</code>, <code>debug</code>, <code>info</code>, <code>warn</code>, <code>error</code>, and the default is <code>debug</code>.</td></tr><tr><td><code>&#x3C;Events>&#x3C;Log>&#x3C;Enabled></code></td><td>Y</td><td>The event logging function can be enabled or disabled with <code>true</code> or <code>false</code>.</td></tr><tr><td><code>&#x3C;Events>&#x3C;Log>&#x3C;Path></code></td><td>N</td><td>Specifies the directory where event log files are saved. The default directory is <code>/var/log/ovenmediaengine</code>.</td></tr></tbody></table>

{% hint style="warning" %}
If you modify `Server.xml`, you need to restart OvenMediaEngine and the Web Console.
{% endhint %}

### Configuration using the Web Console

You can enable the event monitoring function through the UI on the Web Console's Server Settings page.

<figure><img src="https://content.gitbook.com/content/xo7moYXTh3yBG01Dy49w/blobs/IOpeL2bpd3XoS2PBnPPv/%EC%84%A4%EC%A0%95.JPG" alt=""><figcaption></figcaption></figure>

1. Navigate to the Settings → Server page using the navigation at the top-right of the screen.
2. Set the values in the monitoring section.   \
   2-1. `level`: Set the level of event logs.   \
   2-2. `Log Enabled`: Set to `true` to enable event logging.   \
   2-3. `Log Path`: Set the directory where event logs will be saved. If set to an empty value, event logs will be saved as `event.log` in OvenMediaEngine's default log storage directory, `/var/log/ovenmediaengine`.
3. After setting the values, click the `Update Changes` button at the top to apply the changes.

{% hint style="warning" %}
OvenMediaEngine will automatically restart when changes are applied.
{% endhint %}

## Post Configuration

### Web Console Event Log Directory Setting

{% hint style="success" %}
No additional settings are needed if you use the default directory, /var/log/ovenmediaengine.
{% endhint %}

To synchronize recorded event logs with the Web Console, you need to match the Web Console's environment variables with the configured `LogPath`.

You can set the changed event logging directory by adding environment variables to [system.env](https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/web-console/getting-started-with-web-console).

```
OS_ENGINE_MONITORING_EVENT_PATH=/your/eventlog/directory
```

### Event Specification

Please refer to the [Event Specification](https://ovenmediaengine-enterprise.gitbook.io/guide/exclusive/web-console/web-console-overview/event-monitoring/event-specification) document for details on the event formats and event lists recorded through event logging.
