# Logging

Logging settings for the datarhei Core.

## Configuration

{% tabs %}
{% tab title="JSON" %}

```
{
   "log": {
      "level": "info",
      "topics": [],
      "max_lines": 1000
   }
}
```

{% endtab %}

{% tab title="ENV" %}

```
CORE_LOG_LEVEL=info
CORE_LOG_TOPIC=[]
CORE_LOG_MAXLINES=1000
```

{% endtab %}
{% endtabs %}

### level (string)

The verbosity of the logging. The datarhei Core is writing the logs to `stderr`. Possible values are:

* `silent`\
  No logging at all.
* `error`\
  Only errors will be logged.
* `warn`\
  Warnings and errors will be logged.
* `info`\
  General information, warnings, and errors will be logged.
* `debug`\
  Debug messages and every thing else will be logged. This is very chatty.

The default logging level is `info`.

### topics (array)

Logging topics allow you to restrict what type of messages will be logged. This is practical if you enable debug logging and want to see only the logs you're interested in. An empty list of topics means that all topics will be logged.

**An non-exhaustive list of logging topics:**&#x20;

* cleanup
* config
* core
* diskfs
* http
* httpcache
* https
* let's encrypt
* memfs
* process
* processstore
* rtmp
* rtmp/s
* rtmps
* update
* service
* session
* sessionstore
* srt

By default all topics are logged.

### max\_lines (integer)

The log is also kept in memory for retrieval via the API. This value defines how many lines shoul dbe kept in memory.

The default is 1000 lines.
