Log file/Advanced: Difference between revisions
No edit summary |
|||
Line 51: | Line 51: | ||
<extralogging>true</extralogging> | <extralogging>true</extralogging> | ||
<setextraloglevel>64,2048,32768</setextraloglevel> | <setextraloglevel>64,2048,32768</setextraloglevel> | ||
<showloginfo>true</showloginfo> | <showloginfo>true</showloginfo> <!-- Change this to "false" to hide the on-screen debug log text --> | ||
</debug> | </debug> | ||
</advancedsettings> | </advancedsettings> | ||
Line 127: | Line 127: | ||
=== On the bug tracker === | === On the bug tracker === | ||
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 | 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. | ||
= Log files = | = Log files = | ||
Line 146: | Line 146: | ||
|'''iOS/ATV2''' || <code>/private/var/mobile/Library/Preferences/xbmc.log</code> | |'''iOS/ATV2''' || <code>/private/var/mobile/Library/Preferences/xbmc.log</code> | ||
|- | |- | ||
|'''Linux''' || <code>$HOME/.xbmc/temp/xbmc.log</code> | |'''Linux''' || <code>$HOME/.kodi/temp/kodi.log</code> ''or <code>$HOME/.xbmc/temp/xbmc.log''</code> | ||
|- | |- | ||
|'''Mac OS X''' || <code>/Users/''<username>''/Library/Logs/xbmc.log</code> | |'''Mac OS X''' || <code>/Users/''<username>''/Library/Logs/xbmc.log</code> | ||
Line 171: | Line 171: | ||
<pre>sudo apt-get install pastebinit -y | <pre>sudo apt-get install pastebinit -y | ||
cat $HOME/.xbmc/temp/xbmc.log | pastebinit</pre> | cat $HOME/.kodi/temp/kodi.log | pastebinit | ||
''(or cat $HOME/.xbmc/temp/xbmc.log | pastebinit)''</pre> | |||
Submit the link you get in any forums discussion where you post about '''any''' problem. | Submit the link you get in any forums discussion where you post about '''any''' problem. |
Revision as of 16:51, 31 December 2014
Troubleshooting | HOW-TO:Submit a bug report | Log file | Advanced |
- Not sure what to do, but someone just asked you for a "log file", "debug log", or "xbmc.log"? Click here.
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.
Template:Log file password warning
Enable debugging
If someone asks for a debug log then debugging needs to be enabled. There are three ways to do this:
- Select the enable debug options in the GUI settings
- Use an advancedsettings.xml file
- Toggle debug logging with a keyboard or remote shortcut
GUI settings
Most users only need to enable debug logging in the GUI.
In Settings -> System -> Debugging toggle the Enable debug logging setting.
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 advancedsettings.xml
and make sure the extension is just .xml
and not something like ".xml.txt" or ".xml.doc".
advancedsettings.xml for normal debugging
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:
<advancedsettings> <loglevel>2</loglevel> <!-- Change this to "1" to hide the on-screen debug log text --> </advancedsettings>
advancedsettings.xml for input devices
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:
<advancedsettings> <loglevel>2</loglevel> <!-- Change this to "1" to hide the on-screen debug log text --> <debug> <extralogging>true</extralogging> <setextraloglevel>64,2048,32768</setextraloglevel> <showloginfo>true</showloginfo> <!-- Change this to "false" to hide the on-screen debug log text --> </debug> </advancedsettings>
advancedsettings.xml for everything
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.
<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>
Technical notes
Extended content | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Everything except the As one can see from the previous sections, individual component logging is set using the
|
Keyboard or remote shortcut
Since XBMC v12 a keymap.xml file can map a keyboard shortcut or remote control button to toggle debugging using the value toggledebug
. For example, <l>toggledebug</l>
. See here and keymaps for more information on how to define a keyboard or remote button.
After you have enabled debug logging, please restart Kodi so that the log starts fresh and contains full start-up 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: Always include the whole debug log. Don't assume which portions of the log are relevant or not.
- Note: Make sure you have enabled "debug logging". The normal log file, without debugging enabled, is almost always useless when it comes to troubleshooting!
In the forums and IRC
Use a pastesite such as http://xbmclogs.com , http://pastebin.com , or http://pastebin.ca 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
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.
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 XBMC session. If Kodi crashes AND you have restarted it before viewing the log, this is the one you want.
Location
kodi.log (or xbmc.log) and kodi.old.log (or xbmc.old.log) are located here, depending on your platform:
Operative system | File/Folder Paths |
---|---|
Template:Helix note | |
Android | Note: The first folder might be different on various devices: /data/org.xbmc.xbmc/cache/temp/xbmc.log
or |
iOS/ATV2 | /private/var/mobile/Library/Preferences/xbmc.log
|
Linux | $HOME/.kodi/temp/kodi.log or $HOME/.xbmc/temp/xbmc.log
|
Mac OS X | /Users/<username>/Library/Logs/xbmc.log
|
Windows | %APPDATA%\XBMC\xbmc.log
|
Special protocol | special://logpath (this can be used by scripts)
|
See Log file/File manager access for how to copy the debug log file using the File manager.
Easy ways to get and post the log file
Debug log add-on
You can use the XBMC Log Uploader to make the process of getting your debug log easier.
Automatic pastebin log in Linux via command line
You can generate a debug.log Pastebin link automatically quickly to post anywhere that requires a debug.log.
- See also: Accessing XBMC via SSH e.g. Putty
- Note: Don't forget to enable debugging
sudo apt-get install pastebinit -y cat $HOME/.kodi/temp/kodi.log | pastebinit ''(or cat $HOME/.xbmc/temp/xbmc.log | pastebinit)''
Submit the link you get in any forums discussion where you post about any problem.
Technical details about log files
Extended content |
---|
LayoutEach event is logged to one line of the Kodi log file which is formatted as follows... [TIMESTAMP] T:[THREADID] M:[FREEMEM] [LEVEL]: [MESSAGE]
Log levelsThere 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.
In order from least to most severe...
In order from least to most information provided...
|