Log file/Advanced

From Official Kodi Wiki
Jump to navigation Jump to search
Home icon grey.png   ▶ Troubleshooting ▶ Log file ▶ Advanced


This page will describe how to create, access and upload the Debug Log file when Kodi is unresponsive or you are unable to navigate the menu system. If you can navigate the menu system, it is recommended you use the Easy Method.


The process requires the creation or editing of a file called advancedsettings.xml which is a simple .txt file with the extention changed to .xml. The file does not exist by default and must be created.

The file must be saved in the correct location as shown in the table below. If you already have an advancedsettings.xml file, then simply edit the file by inserting the appropriate entries into the file somewhere between the opening and closing <advancedsettings> tags, ensuring it does not interfere with existing tags.

1. Location of the advancedsettings.xml file.

The advancedsettings.xml file is located as shown in the table below. You will either have an existing advancedsettings.xml file here, or you will need to create one and place it here.

The Userdata folder is a subfolder of the Kodi Data Folder and is located as shown in the table below.

Operating system Userdata Folder
Android Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note)
iOS /private/var/mobile/Library/Preferences/Kodi/userdata/
LibreELEC /storage/.kodi/userdata/
Linux ~/.kodi/userdata/
macOS /Users/<your_user_name>/Library/Application Support/Kodi/userdata/
Nvidia Shield (SMB) smb://<nvidiashieldurl>/internal/Android/data/org.xbmc.kodi/files/.kodi/userdata
OSMC /home/osmc/.kodi/userdata/
tvOS /private/var/mobile/Library/Preferences/Kodi/userdata/
webOS /media/developer/apps/usr/palm/applications/org.xbmc.kodi/.kodi/userdata/
Windows %APPDATA%\Kodi\userdata
Windows Portable <Install location chosen by you>\portable_data\userdata\
Windows via Microsoft Store %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\
Windows Xbox %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\
Note: In some Android setups the path may be slightly different to the one stated above.

2. Create and Edit the advancedsettings.xml file.
  1. Create a blank text file either in the location specified above or in a more convenient location. Ensure it is plain text file, not a Word document for example. (Technical: save as UTF-8)
  2. Add the Debug Mode code specified in the next section. If you are unsure which code to use, then copy one of the two examples and paste it into the blank file. If you are editing an existing advancedsettings.xml file, do not duplicate the <advancedsettings> tags.
  3. If you have been asked to enable Component Logging for a particular component, then add the correct code as detailed in the below section Enable Component Logging.
  4. Save the file. Name/rename it advancedsettings.xml. Ensure the extension is .xml and not something like .xml.txt or similar.
  5. If you created the file in another location, now move the file to the correct location as specified in the table in the previous section.

3. The Debug Mode code to add to the advancedsettings.xml file

A number of options exist to enable Debug Mode. Choose an option, or copy and paste one of the Examples if unsure.

Sets the logging level used to log errors and information. The "hide" attribute is optional.

  <loglevel hide="attribute">options</loglevel>
Attribute Action
true Hides the "enable debugging" setting in the Settings page. (default)
false Allows "enable debugging" setting to switch between 0 and 2.
Option Action
-1 No logging, suppresses all log output
0 Normal logging, only logging errors (default)
1 Debug logging with freemem, fps and cpu usage (no on screen)
2 Same as 1 (with on screen display)
3 Same as 1 + full smb logging
Example 1:
<advancedsettings version="1.0">
Example 2:
<advancedsettings version="1.0">
    <loglevel hide="true">2</loglevel>

Note: The setting is persistent through shutdown and restarts.
Note: If debugging is enabled in the GUI, loglevel will be set to 2. This will over-ride the advancedsettings.xml setting. You must disable the GUI Setting before adding the entry to advancedsettings.xml.

4. The Component Logging code to add to the advancedsettings.xml file

Only add this if you have been specifically asked to add it.

To enable Component Logging, copy the following code to the advancedsettings.xml file. Do not duplicate the <advancedsettings> tags.

The first line enables the extra logging. Available options are true to enable and false to disable.

The second line requires component values to be inserted. Replace the wording EnterValues with the required values. Multiple values are separated by a comma and no spaces. The available components and values are listed in the expandable table below.

  <setting id="debug.extralogging">true</setting>
  <setting id="debug.setextraloglevel">EnterValues</setting>

GUI name <setextraloglevel> code
The SMB library 32
The libcURL library (HTTP(S), DAV) 64
The FFmpeg libraries 128
JSON-RPC requests 1024
The Audio component 2048
The Airtunes library 4096
The UPnP components 8192
The libCEC library 16384
The Video component 32768
The Webserver component 65536
The Database component 131072
audio/video timing information 262144
Windowing component 524288
PVR component 1048576
EPG component 2097152
Announce Logging 4194304
WS-Discovery component 8388608
Add-ons component[1] 16777216

5. It is important that you now replicate the problem. Do whatever you did previously when you experienced the problem.

For example...

  • If Kodi fails to start, then try starting Kodi
  • If Kodi crashes when you perform a particular action, then repeat the action to cause the crash

6. The log must now be uploaded to the Kodi paste site using one of the methods in the next section:
If you are using a desktop operating system, such as Windows, then you can simply navigate to the Debug Log using the File Manager of the operating system.
Once you find the log...
  1. Open it with any text editor and copy the contents of the file.
  2. Paste the contents to a paste site like http://paste.kodi.tv/, and press the Save icon.
  3. For very large logs, you may need to split the log into two or more pastes. Each paste can hold approx 15,000 lines or 2MB of log.
  4. When the screen refreshes with your paste, copy the entire address in the address bar and paste it into a new message in your post.
Logs are located in the following locations:
Operating System File/Folder Path
Android The folder may differ depending on the device:
  • /data/org.xbmc.kodi/cache/temp/kodi.log
  • /sdcard/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log
  • /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log
CoreELEC /storage/.kodi/temp/kodi.log
Flatpak ~/.var/app/tv.kodi.Kodi/data/temp/kodi.log
iOS/tvOS /private/var/mobile/Library/Preferences/kodi.log
LibreElec /storage/.kodi/temp/kodi.log
Linux $HOME/.kodi/temp/kodi.log
macOS /Users/<username>/Library/Logs/kodi.log
Nvidia Shield (SMB) smb://<nvidiashieldurl>/internal/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log
OSMC /home/osmc/.kodi/temp/kodi.log
webOS /media/developer/apps/usr/palm/applications/org.xbmc.kodi/.kodi/temp/kodi.log
Windows %APPDATA%\Kodi\kodi.log
Windows Portable <Install location chosen by you>\portable_data\
Windows (UWP) %LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\kodi.log
Special protocol special://logpath (this can be used by scripts)

Operating System Specific

General notes pertinent to the various operating systems.


If you are a Windows user and are struggling with this page, then see our step by step guide in the following link. Users of other operating systems can still use this guide, but will need to adapt some of the steps.

See: Advanced debugging for Dummies


Generate a debug.log link automatically to post anywhere that requires a debug.log.

sudo apt install pastebinit -y

pastebinit $HOME/.kodi/temp/kodi.log
See also: Accessing Kodi via SSH

Technical Details

A brief description of the log contents.


Each event is logged to one line of the Kodi log file which is formatted as follows...

  • TIMESTAMP - The date and time at which the event occurred- yy:mm:dd hh:mm:ss.sss
  • THREADID - The thread identification number in which the event occurred.
  • LEVEL - The severity of the event. See below.
  • MESSAGE - A brief description and/or important information about the event.

Severity Levels

How potentially damaging an event is. Listed in order from least to most severe...

  • DEBUG - In depth information about the status of Kodi.
  • INFO - Something has happened. It's not a problem, we just thought you might want to know. Fairly excessive output that most people won't care about.
  • NOTICE - Similar to INFO but the average Joe might want to know about these events. This level and above are logged by default.
  • WARNING - Something potentially bad has happened. If Kodi did something you didn't expect, this is probably why. Watch for errors to follow.
  • ERROR - This event is bad. Something has failed. You likely noticed problems with the application be it skin artifacts, failure of playback a crash, etc.
  • FATAL - We're screwed. Kodi is about to crash.

Return to top