Log file/Advanced

From XBMC
< Log file
Revision as of 19:46, 18 April 2012 by Ronie (Talk | contribs)
Jump to: navigation, search

At some point during your foray into XBMC, 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. XBMC 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.


Warning: if you password protect any of your media shares then that password can be exposed in your log file and you won't want that just hanging out on the internet. If this applies to you then you will want to replace any mention of your passwords with asterisks or something so that we still know you had used a password at one point (since that in itself is information that may or may not be important).

Contents

1 Log Files

2 Location

xbmc.log and xbmc.old.log are located here, depending on your platform:

OSX/ATV /Users/<username>/Library/Logs/
Linux /home/<username>/.xbmc/temp/
Windows %APPDATA%\XBMC\
iOS (ATV2/iPad/iPhone) /private/var/mobile/Library/Preferences/xbmc.log

3 Enable Debugging

There are two ways to control log output.

3.1 GUI Setting

In Settings > System > Debugging there is a setting Enable debug logging. This lets you toggle between Normal and Debug w/ visuals on the fly.
NOTE: This option is hidden if you have set the log level in advancedsettings.xml.

3.2 AdvancedSettings.xml

You can set any of the five log levels using the <loglevel> tag in advancedsettings.xml. See here for details. Setting debug level like this will hide the GUI setting.

after you have enabled debug logging, please restart xbmc.

4 Debug log add-on

You can also use the XBMC Log Uploader to make the process of getting your debug log easier.

5 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 XBMC to truncate the file, recreate the problem in as few steps as possible, then stop XBMC and try again. If it is still too large, try disabling features such as "scan library on startup", which spams a lot of info to the log (unless of course this is where the problem is ;)). The last resort would be to break the file up across multiple posts.

Note: Only a log with debugging enabled is useful to others (especially developers!). Please ensure your log is a debug log when you are inquiring about problems or creating bug reports. We're just going to ask you for another one if you don't.

5.1 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!

5.2 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. It's great.

6 Layout

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

[TIMESTAMP] T:[THREADID] M:[FREEMEM] [LEVEL]: [MESSAGE]

7 Log Levels

There are two different types levels when talking about the XBMC log. The first is the severity of event that has occurred. The second controls which severity levels are actually printed out to the log.

7.1 Severity Levels

In order from least to most severe...

7.2 Log File Control Levels

In order from least to most information provided...

8 See also

Personal tools
Namespaces
Variants
Actions
Navigation
Wiki help
Google Search
Toolbox