Difference between revisions of "Log file/Advanced"

From Official Kodi Wiki
Jump to navigation Jump to search
(→‎Location: added Raspberry Pi log location)
m (Updated for v19)
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{mininav| [[Troubleshooting]] | [[HOW-TO:Submit a bug report]] | [[Log file]] }}
{{mininav| [[Troubleshooting]] | [[Log file]] }}


:{{bigger|''Not sure what to do, but someone just asked you for a "log file", "debug log", "kodi.log", or "xbmc.log"? '''[[Log file/Easy|Click here]].'''''}}


= Introduction =
<section begin="intro" />This page will describe how to create, access and upload the Debug Logfile 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 '''''[[Log_file/Easy|Easy Method]]'''''.<section end="intro" />


<section being="intro" />At some point during your foray into {{kodi}}, you will likely come up against a problem that isn't made 100% clear from errors in the GUI. This is where the log file comes into play. {{kodi}} writes all sorts of useful stuff to its log, which is why it should be included with every bug/problem report. Don't be afraid of its contents! Often a quick glance through the log will turn up a simple typo or missing file which you can easily fix on your own.<section end="intro" />




= Enable debugging = <!-- odd header levels are used intentionally for better readability on this specific page -->
= Steps =
If someone asks for a debug log then debugging needs to be enabled. There are three ways to do this:
The process requires the creation or editing of a file called '''''[[Advancedsettings.xml|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'''.  


# Select the enable debug options in the '''[[#GUI settings|GUI settings]]'''
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.
# Use an '''[[#advancedsettings.xml|advancedsettings.xml]]''' file
# Toggle debug logging with a '''[[#Keyboard or remote shortcut|keyboard or remote shortcut]]'''




== GUI settings ==
{| class="prettytable" style="width:70%"
Most users only need to enable debug logging in the GUI.
|-
! scope="row" ! style="background-color:#b8ecff; text-align:left;"|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.


In {{highlight|bordered=yes|[[Settings/System#Logging|Settings -> System -> Logging]]}} toggle the '''''Enable debug logging''''' setting.
:{{#lst:Userdata|location all}}


{{#lst:Settings/System|debugging}}


{| class="prettytable" style="width:70%"
|-
! scope="row" ! style="background-color:#b8ecff; text-align:left;"|2. Create and Edit the advancedsettings.xml file.
|}
# 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)
# 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.
# 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''.
# Save the file. Name/rename it '''advancedsettings.xml'''. Ensure the extension is ''.xml'' and not something like ''.xml.txt'' or similar.
# 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.


== Turn on debugging using a file (advancedsettings.xml) ==
{{anchor|advancedsettings.xml}}
You can manually enable debug logging directly using an [[advancedsettings.xml]] file. This is especially useful if {{kodi}} is crashing during start-up and you are unable to turn debugging on via the GUI. The advancedsettings.xml file is simply a plain text document that is saved in the [[userdata folder]] and read when {{kodi}} first starts up. You can use the following examples to enable debug logging:


{{note|Be sure to format this as a '''plain text''' document, and make sure it is titled <code>advancedsettings.xml</code> and make sure the extension is ''just'' <code>.xml</code> and not something like ".xml.txt" or ".xml.doc". }}
{| class="prettytable" style="width:70%"
 
|-
=== advancedsettings.xml for normal debugging ===
! scope="row" ! style="background-color:#b8ecff; text-align:left;"|3. The Debug Mode code to add to the advancedsettings.xml file
If you want '''basic debug logging''' then use this. This the same as enabling logging in the GUI without enabling component-specific logging. Start with this one first if you are not sure which mode to use:
|}
 
:A number of options exist to enable Debug Mode. Choose an option, or copy and paste one of the Examples if unsure.
<syntaxhighlight lang="xml">
:{{#lst:Advancedsettings.xml|loglevel}}
<advancedsettings>
    <loglevel>2</loglevel> <!-- Change this to "1" to hide the on-screen debug log text -->
</advancedsettings>
</syntaxhighlight>




{| class="prettytable" style="width:70%"
|-
! scope="row" ! style="background-color:#b8ecff; text-align:left;"|4. The Component Logging code to add to the advancedsettings.xml file
|}


=== advancedsettings.xml for input devices ===
:'''Only add this if you have been specifically asked to add it.'''
''Useful as you cannot enable debug logging in the GUI if your input devices don't work.''


If you only want debug logging with verbose components for '''input devices''' (JSON-RPC, CEC, HTTP, for remotes, smart phone remotes, web remotes, etc) then use this:
:To enable Component Logging, copy the following code to the ''advancedsettings.xml'' file. Do not duplicate the ''<advancedsettings>'' tags.
<syntaxhighlight lang="xml">
<advancedsettings>
    <loglevel>2</loglevel> <!-- Change this to "1" to hide the on-screen debug log text -->
    <debug>
        <extralogging>true</extralogging>
        <setextraloglevel>64,1024, 16384</setextraloglevel>
        <showloginfo>true</showloginfo> <!-- Change this to "false" to hide the on-screen debug log text -->
    </debug>
</advancedsettings>
</syntaxhighlight>


=== advancedsettings.xml for everything ===
:The first line enables the extra logging. Available options are ''true'' to enable and ''false'' to disable.
If you want debug logging with '''all verbose components''' enabled use this.


{{note|Normally, you don't want to use this one unless specifically asked for it, as it will create a very hard-to-read debug log.}}
: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.


<syntaxhighlight lang="xml">
{| class="mw-collapsible mw-collapsed wikitable"
<advancedsettings>
    <loglevel>2</loglevel> <!-- Change this to "1" to hide the on-screen debug log text -->
    <debug>
        <extralogging>true</extralogging>
        <setextraloglevel>32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536</setextraloglevel>
        <showloginfo>true</showloginfo>
    </debug>
</advancedsettings>
</syntaxhighlight>
 
=== Technical notes ===
{{collapse top}}
Everything except the <code><loglevel></code> tag is actually taken from guisettings.xml, but they can be used in the advancedsettings.xml file as a way to manually enable them.
 
As one can see from the previous sections, individual component logging is set using the <code><setextraloglevel></code> tag. A complete list of the components and their setting value follows:
 
{| class="prettytable"
! Component !! setting value
|-
| LOGSAMBA || 32
|-
| LOGCURL || 64
|-
| LOGFFMPEG || 128
|-
|-
| LOGDBUS || 512
! scope="row" ! style="width:600px;" | Code
|-
|-
| LOGJSONRPC || 1024
|
|-
<advancedsettings>
| LOGAUDIO || 2048
    <setting id="debug.extralogging">true</setting>
|-
    <setting id="debug.setextraloglevel">EnterValues</setting>
| LOGAIRTUNES || 4096
</advancedsettings>
|-
| LOGUPNP || 8192
|-
| LOGCEC || 16384
|-
| LOGVIDEO || 32768
|-
| LOGWEBSERVER || 65536
|}
|}
{{collapse bottom}}


== Password warning ==
:{{#lst:Log_file/Easy|ComponentValues}}
{{Log file password warning}}


== Keyboard or remote shortcut ==
By plugging in a keyboard, debug mode can be toggled by pressing {{keypress|shift|ctrl|D}}


Other keys, or buttons on remotes, can be used to toggle debug mode. Just use the [[action ID]] <code>toggledebug</code> along with a custom '''[[keymap]]'''.
{| class="prettytable" style="width:70%"
|-
! scope="row" ! style="background-color:#b8ecff; text-align:left;"|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


== Component-specific logging ==


For more extensive logging, several system components can be selected to put in more detailed debug messages in Kodi's log file. Multiple components can be selected for extending the debugging of the Kodi application.
{| class="prettytable" style="width:70%"
|-
! scope="row" ! style="background-color:#b8ecff; text-align:left;"|6. The log must now be uploaded to a [[w:Pastebin|Pastebin]] type site using one of the following methods:
|}


[[File:Component-logging-selection.jpg|500px|Component logging selection window|right]]
:{{#lst:Log_file/Easy|CopyAndPaste}}


First, you need to enable this feature via toggling
:{{LogfilePath}}


{{highlight|bordered=yes|[[Settings/System#Logging|Settings -> System -> Logging -> Enable component-specific logging]]}}.




Then specifiy which components you want logged into the Kodi log file.
= Operating System Specific =
General notes pertinent to the various operating systems.


{{highlight|bordered=yes|[[Settings/System#Logging|Settings -> System -> Logging -> - Specify component-specific logging...]]}}.


One or more components can be selected for further investigating the debugging on your Kodi device, subject to your Kodi hardware capabilities.
== Windows ==
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.


* The SMB library
:'''''See: [https://forum.kodi.tv/showthread.php?tid=323719 Advanced debugging for Dummies]'''''
* The libcURL library (HTTP(S), DAV)
* The FFmpeg libraries
* The Audio component
* The Video component
* D-Bus calls
* JSON-RPC requests
* The Webserver component
* The Airtunes library
* The UPnP components
* The libCEC library
* The Database component
* Audio/video timing information


= So what do I do with this thing? =


Whatever you do, please '''DO NOT''' paste it directly into IRC, a forum post or ticket on the bug tracker.  This not only clutters said text, but the log is nearly impossible to read like this.  If your log file is too big for the following methods, please restart {{kodi}} to start a clean log file file, recreate the problem in as few steps as possible, then stop {{kodi}} and try again.  If it is still too large, try disabling features such as "scan library on startup", which spam's a lot of info to the log (unless of course this is where the problem is).


:{{note|{{big|'''Always include the whole debug log.''' Don't assume which portions of the log are relevant or not. }} }}
== Linux ==
Generate a debug.log link automatically to post anywhere that requires a debug.log.


:{{note|Make sure you have enabled "debug logging". The normal log file, without debugging enabled, is almost always useless when it comes to troubleshooting!}}
<pre>sudo apt install pastebinit -y


=== In the forums and IRC ===
pastebinit $HOME/.kodi/temp/kodi.log</pre>
Use a pastesite such as http://pastebin.com , or http://paste.ubuntu.com on when posting on the forums. Simply visit one of these sites, paste or upload your log and hit submit.  After a few seconds you'll have a nice short URL to paste in your post.  Be sure to select an appropriate time to keep your paste around when submitting!


=== On the bug tracker ===
:'''''See also: [[SSH|Accessing Kodi via SSH]]'''''
Just upload the log to your ticket as an attachment.  '''DO NOT''' archive (zip,rar,tar,etc) it in anyway!  Trac will let us view it right on the site without downloading.


=== Watch it locally, perhaps spotting errors you can fix or report ===
Using 'tail -f {location}' you can watch the log from a cmd/console (better with 2 displays), or better, via ssh (won't distract the gui).


= Log files =
* '''kodi.log''' or '''xbmc.log''' - This is the log file of most recent (or currently running) {{kodi}} session.
* '''kodi.old.log''' or '''xbmc.old.log''' - This is the log file from the last Kodi session.  If {{kodi}} crashes AND you have restarted it before viewing the log, this is the one you want.


=== Location ===
= Technical Details =
''kodi.log'' {{small|(or ''xbmc.log'')}} and ''kodi.old.log'' {{small|(or ''xbmc.old.log'')}} are located here, depending on your platform:
A brief description of the log contents.
{|class="prettytable"
! style="background: lightgrey; width: 150px" | '''Operative system'''
! style="background: lightgrey; width: 800px" | '''File/Folder Paths'''
|-
| colspan=2 | ''Directories and files named <code>'''kodi'''</code> were called <code>'''xbmc'''</code> in versions before v14.''
|-
|'''Android'''  || {{note|The first folder might be different on various devices:}}
*<code>''<data/sdcard/Android>''/data/org.xbmc.kodi/cache/temp/kodi.log</code>
*<code>/sdcard/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log</code>


*<code>/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log</code>
|-
|'''iOS/ATV2''' || <code>/private/var/mobile/Library/Preferences/kodi.log</code>
|-
|'''Linux''' || <code>$HOME/.kodi/temp/kodi.log</code>
|-
|'''Raspberry Pi''' || <code>/storage/.kodi/temp/kodi.log</code>
|-
|'''macOS''' || <code>/Users/''<username>''/Library/Logs/kodi.log</code>
|-
|'''Windows desktop''' || <code>%APPDATA%\Kodi\kodi.log</code>
|-
|'''Windows store (UWP)''' || <code>%LOCALAPPDATA%\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\kodi.log</code>
|-
| '''[[Special protocol]]''' || <code>special://logpath (this can be used by scripts)</code>
|}




See '''[[Log file/File manager access]]''' for how to copy the debug log file using the [[File manager]].
== Layout ==
 
Each event is logged to one line of the {{kodi}} log file which is formatted as follows...
= Easy ways to get and post the log file =
<pre>[TIMESTAMP] T:[THREADID] [LEVEL]: [MESSAGE]</pre>
=== Debug log add-on ===
* '''TIMESTAMP''' - The date and time at which the event occurred- yy:mm:dd hh:mm:ss.sss
{{main|Log file/Easy}}
* '''THREADID''' - The thread identification number in which the event occurred.
You can use the '''[[Add-on:Kodi Log Uploader|Kodi Logfile Uploader]]''' to make the process of getting your debug log easier.
* '''LEVEL''' - The severity of the event. See below.
* '''MESSAGE''' - A brief description and/or important information about the event.


=== Automatic pastebin log in Linux via command line ===
You can generate a debug.log [http://en.wikipedia.org/wiki/Pastebin Pastebin] link automatically quickly to post anywhere that requires a debug.log.
<br />
:'''''See also:''''' [[SSH|Accessing Kodi via SSH]] e.g. Putty


:{{note|Don't forget to [[#Enable debugging|enable debugging]]}}
<pre>sudo apt-get install pastebinit -y


cat $HOME/.kodi/temp/kodi.log | pastebinit</pre>
== Severity Levels ==
''(or cat $HOME/.Kodi/temp/kodi.log | pastebinit)''
How potentially damaging an event is. Listed in order from least to most severe...


Submit the link you get in any forums discussion where you post about '''any''' problem.
* '''DEBUG''' - In depth information about the status of {{kodi}}.  
 
= Technical details about log files =
{{Editor note|This section might be outdated now that {{kodi}} has component-level logging. Some of it should still be true, but just keep in mind that this section hasn't been totally cleaned up for v13 and v14 yet.}}
<!-- {{collapse top}} - this is good stuff I missed the first time around for lack of expansion. I expect even a cursory user will take a peek and wonder what the heck the guts are. -->
=== Layout ===
Each event is logged to one line of the {{kodi}} log file which is formatted as follows...
<pre>[TIMESTAMP] T:[THREADID] M:[FREEMEM] [LEVEL]: [MESSAGE]</pre>
* '''TIMESTAMP''' - The wall time at which the event occurred.
* '''THREADID''' - The thread identification number of the thread in which the event occurred.
* '''FREEMEM''' - The amount of memory (in bytes) free at the time of the event.
* '''LEVEL''' - The severity of the event.
* '''MESSAGE''' - A brief description and/or important information about the event.
 
=== Log levels ===
There are two different types levels when talking about the {{kodi}} log.  The first is the severity of event that has occurred.  The second controls which severity levels are actually printed out to the log.
 
;Severity levels
In order from least to most severe...
* '''DEBUG''' - In depth information about the status of {{kodi}}.  This information can pretty much only be deciphered by a developer or long time {{kodi}} power user.
* '''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.
* '''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.
* '''NOTICE''' - Similar to INFO but the average Joe might want to know about these events.  This level and above are logged by default.
Line 240: Line 136:
* '''FATAL''' - We're screwed.  {{kodi}} is about to crash.
* '''FATAL''' - We're screwed.  {{kodi}} is about to crash.


;Log file control levels
In order from least to most information provided...
* '''None''' - No logging will occur.  ''kodi.log'' will likely be created but should remain empty.
* '''Normal''' - The default loglevel.  Events with a severity of NOTICE or greater will be logged.
* '''Debug''' - All events are logged.  This level (or higher) is all that you should bother someone else with.
* '''Debug w/ Visuals''' - Same printed log as ''Debug'', but free memory and CPU usage are rendered on the screen as well.
* '''SMB Debug''' - Same as ''Debug w/ Visuals'' with the addition of ridiculous amounts of Samba debugging info.  Use this only if asked.
<!-- {{collapse bottom}} -->


= See also =
* [[HOW-TO:Submit a bug report]]
* [[Bug tracker]]
* [[Troubleshooting]]


{{Updated|17}}


[[Category:Development]]
 
[[Category:Trac]]
{{Top}}
[[Category:Manual]]
{{updated|19}}
 
[[Category:Karellen]]
[[Category:Troubleshooting]]
[[Category:Troubleshooting]]
[[Category:Advanced topics]]

Latest revision as of 02:14, 20 July 2021

Home icon grey.png   ▶ Troubleshooting ▶ Log file ▶ Advanced


1 Introduction

This page will describe how to create, access and upload the Debug Logfile 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.


2 Steps

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/
Mac /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/
Windows %APPDATA%\Kodi\userdata
Windows Portable <Install location chosen by you>\portable_data\userdata\
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 2 + full smb logging (no on screen display)
Example
Example 1:
<advancedsettings>
    <loglevel>2</loglevel>  
</advancedsettings>
Example 2:
<advancedsettings>
    <loglevel hide="true">2</loglevel>
</advancedsettings>

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.
Code
<advancedsettings>
   <setting id="debug.extralogging">true</setting>
   <setting id="debug.setextraloglevel">EnterValues</setting>
</advancedsettings>
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


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 a Pastebin type site using one of the following methods:
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.
  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
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
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)


3 Operating System Specific

General notes pertinent to the various operating systems.


3.1 Windows

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


3.2 Linux

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


4 Technical Details

A brief description of the log contents.


4.1 Layout

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

[TIMESTAMP] T:[THREADID] [LEVEL]: [MESSAGE]
  • 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.


4.2 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