> For the complete documentation index, see [llms.txt](https://www.tvrename.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.tvrename.com/technical/logs-and-configuration.md).

# Logs & Configuration Files

### Configuration Files <a href="#configuration-files" id="configuration-files"></a>

By default, all the configuration information and locally cached data from the [data sources](https://www.tvrename.com/help-and-support/data-sources.md) is stored in a series of XML files under the user's Application folder (unless overridden using the command line option /userfilepath). They are stored at: -

> \Users\\\<user-name>\AppData\Roaming\TVRename\TVRename\2.1

**If you wish to make a backup of your TV Rename setup a copy of this folder is all you need!**

It contains:

| **TVRenameSettings.xml**                                                                        | Everything else not mentioned is stored in here. All your shows, media library paths, folder structures and settings. It is written when you choose **File>Save**, and automatically when **Auto save on Exit** is ticked on the [General](https://www.tvrename.com/menu/preferences/general.md) tab of **Options>Preferences**. |
| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>TheTVDB.xml</strong><br><strong>TMDB.xml</strong><br><strong>TVmaze.xml</strong></p> | The locally cached data about movies, shows, seasons and episodes for everything listed in the ***TV Shows*** and **Movies** tabs.                                                                                                                                                                                               |
| **Layout.xml**                                                                                  | TV Rename’s window position and size as well as column widths.                                                                                                                                                                                                                                                                   |
| **Statistics.xml**                                                                              | TV Rename’s historical statistics.                                                                                                                                                                                                                                                                                               |
| **State.xml**                                                                                   | TV Rename’s record of app state between runs, such as when it last checked for a new version (see [App Updates](https://www.tvrename.com/menu/preferences/app-updates.md) in **Options>Preferences**).                                                                                                                           |

And stores the following backups (10 of each):

| **TVRenameSettings.xml.0-9**                                                                                | Backup copies of TV Rename settings.xml (FIFO).                                                                                                                                                                                             |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>TheTVDB.xml.0-9</strong><br><strong>TMDB.xml.0-9</strong><br><strong>TVmaze.xml.0-9</strong></p> | A maximum of ten backup copies of the XML cache files. A new file gets created here every time the system gets updates from [data sources](https://www.tvrename.com/help-and-support/data-sources.md) on a first-in-first-out (FIFO) basis. |

### Log Files <a href="#log-files" id="log-files"></a>

The main active log file is available from the **Help>Log** menu option. Note that the application only logs to the screen once it’s opened. If you want to see the full log then click on ‘View Full Log’ and the whole thing is opened up. The log window can be moved and the rest of the application used as normal.

The current log file (TVRename.log) can be found in: -

> \Users\\\<username>\AppData\Roaming\TVRename\log\\

Log files are rotated into an “archive” folder (in the same location as TVRename.log) every time TV Rename is run or every 24 hours, whichever is sooner.

A maximum of twenty archived copies of the log file are kept in the archive folder, in files with a number suffix (eg **TVRename.\<nn>.log**) on a first-in-first-out (FIFO) basis.

Logging uses NLog. The configuration file ([NLog.config](https://github.com/TV-Rename/tvrename/blob/master/TVRename/NLog.config)) is stored in the TV Rename program folder.

You can read the [NLog Wiki](https://github.com/nlog/NLog/wiki/Configuration-file) for guidance on how to adjust the configuration file to collect more information.

When raising a bug please include a log file that illustrates the issue if you can. It will help us find a solution quickly.

### Theme Files <a href="#theme-files" id="theme-files"></a>

The **Themes** folder, inside the settings folder above, holds your colour theme files (**\*.theme.xml**) and two folders of its own: **Defaults** (the original Dark, Creme and Midnight themes) and **Backups** (the last copy of each theme that loaded without mistakes). See [Themes](https://www.tvrename.com/main/display-view.md#themes).

### Cache and Supporting Logs <a href="#cache-and-supporting-logs" id="cache-and-supporting-logs"></a>

| **log/cef-debug.log** | Specific log file related to the in-built browser                                                                 |
| --------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **audit/\*.json**     | If enabled, audit logs the downloaded information from the upstream data sources. Can be safely deleted if needed |
| **cache/\***          | Cache that the built-in browser uses to speed its operation. Can be safely deleted.                               |

### The Registry <a href="#the-registry" id="the-registry"></a>

The only information TV Rename stores in the registry is installation information which is used by Windows “Apps and Features” to un-install the program.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.tvrename.com/technical/logs-and-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
