Log file/Advanced

From XBMC
(Difference between revisions)
Jump to: navigation, search
(So what do I do with this thing?)
(GUI Setting)
Line 47: Line 47:
 
There are two ways to control log output.
 
There are two ways to control log output.
 
===GUI Setting===
 
===GUI Setting===
In '''Settings > System''' there is a setting '''''Enable debug logging'''''.  This lets you toggle between ''Normal'' and ''Debug w/ visuals'' on the fly.<br>
+
In '''Settings > System > Debugging''' there is a setting '''''Enable debug logging'''''.  This lets you toggle between ''Normal'' and ''Debug w/ visuals'' on the fly.<br>
'''NOTE''': This option is hidden if you have set the log level in [[advancedsettings.xml]].
+
'''NOTE:''' This option is hidden if you have set the log level in [[advancedsettings.xml]].
  
 
===AdvancedSettings.xml===
 
===AdvancedSettings.xml===

Revision as of 02:26, 5 January 2010

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.

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\
Xbox E:\APPS\XBMC\ (assuming you've installed XBMC in E:\APPS)

3 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]

4 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.

4.1 Severity Levels

In order from least to most severe...

4.2 Log File Control Levels

In order from least to most information provided...

5 Enable Debugging

There are two ways to control log output.

5.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.

5.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.

6 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.

6.1 In The Forums and IRC

Use a pastesite such as pastebin.com or 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!

6.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.

Personal tools
Namespaces
Variants
Actions
Navigation
Wiki help
Google Search
Toolbox