# Log Files

When recording a session, SonarLink will create a log file with the extension `.svlog`. Long recording sessions will be automatically split across multiple files to limit the size of each file.

As of 1.14.20-beta, log files will be stored on disk with the extension `.svlz` instead. These files have the same content as a `.svlog` file but are compressed with gzip to use less space on disk. SonarView can open these files directly and can convert a compressed file as uncompressed or vice-versa (see [Exporting Log Files](/c/sonarview/exporting-log-files.md)).

You can turn svlog compression on or off via the [Session Configurations](/c/sonarview/session-configurations.md) dialog.

<figure><img src="/files/HRKvj1VASWEnWz0aoQK3" alt=""><figcaption></figcaption></figure>

## Working with Log Files

The following commands are intended for Linux / MacOS machines, or Windows machines running WSL.&#x20;

#### Mass File Compression

If you have a lot of uncompressed `.svlog` files, it can be a bit tedious to drag them all into SonarView and re-export as .svlz, as you will then need to move them from your Downloads folder back to the original location. To get around this you can use some simple command line functions. \
\
To convert all .svlog in the current directory to .svlz:

```
for f in *.svlog; do gzip -c "$f" > "${f%.svlog}.svlz"; done
```

\
Or to do the same operation recursively:

```
find . -name "*.svlog" -exec sh -c 'gzip -c "$1" > "${1%.svlog}.svlz"' _ {} \;
```

#### Combining Log Files

The following commands are only expected to work with similar SonarView log files (same devices, same area).

A directory of .svlog files can be combined into a single file with:&#x20;

```
cat *.svlog > combined.svlog
```

If the files are compressed (svlz) then the command would be:&#x20;

```
{ for f in *.svlz; do gunzip -c "$f"; done; } | gzip -c > combined.svlz
```

This can take some time as gzip will process the files serially. You can accelerate this substantially by installing [pigz](https://zlib.net/pigz/). Using pigz, you can combine a directory of .svlz files into a single file with:

```
{ for f in *.svlz; do pigz -dc "$f"; done; } | pigz > combined.svlz
```

{% hint style="info" %}
SonarView 1.14.37 or earlier will fail to open .svlz files that decompress to >2GB. This is fixed in SonarView 1.14.39.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ceruleansonar.com/c/sonarview/log-files.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
