Log file/Advanced: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>UNiversal
>UNiversal
m (Some improvemnets.)
Line 3: Line 3:
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.
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.


{{notice|''' For those who are posting logs to the Internet: 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 are using a password (since that in itself is information that may or may not be important), but without exposing it to the public.'''|WARNING - Exposed passwords}}<br />
{{notice|''' For those who are posting logs to the Internet: 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 are using a password (since that in itself is information that may or may not be important), but without exposing it to the public.'''|<big>WARNING - Exposed passwords</big>}}<br />


==Enable Debugging==
==='''Enable Debugging'''===
There are two ways to control log output:
There are two ways to control log output:


Line 19: Line 19:
<pre><loglevel hide="false">2</loglevel></pre>
<pre><loglevel hide="false">2</loglevel></pre>


'''See''' [[Advancedsettings.xml#.3Cloglevel.3E|'''here''']] for details.  Setting debug level like this will hide the GUI setting.
'''''See also:''''' [[Advancedsettings.xml#.3Cloglevel.3E|'''here''']] for details.  Setting debug level like this will hide the GUI setting.


{{frodo box|1=
{{frodo box|1=
Line 29: Line 29:
After you have enabled debug logging, please restart xbmc so that the log contains full start-up information.
After you have enabled debug logging, please restart xbmc so that the log contains full start-up information.


==Debug log add-on==
==='''Debug log add-on'''===
You can also use the '''[[Add-on:XBMC Log Uploader|XBMC Log Uploader]]''' to make the process of getting your debug log easier.
You can also use the '''[[Add-on:XBMC Log Uploader|XBMC Log Uploader]]''' to make the process of getting your debug log easier.


==Automatic pastebin log in Linux via command line==
==='''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.
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 />
<br />
Line 44: Line 44:
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.


==So what do I do with this thing?==
==='''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 spam's a lot of info to the log (unless of course this is where the problem is ;)).
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 spam's a lot of info to the log (unless of course this is where the problem is ;)).


<big>'''*Always include the whole log.'''</big>
<big>'''*Always include the whole debug log.'''</big>


:{{highlight|'''Note:'''|bordered=yes|color=#BEF781}} Only a log with [[#Enable_Debugging|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.
:{{highlight|'''Note:'''|bordered=yes|color=#BEF781}} Only a log with [[#Enable_Debugging|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.


===In The Forums and IRC===
==='''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!
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===
==='''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.
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.


==Log Files==
==='''Log Files'''===
*'''xbmc.log''' - This is the log file of most recent (or currently running) XBMC session.
*'''xbmc.log''' - This is the log file of most recent (or currently running) XBMC session.
*'''xbmc.old.log''' - This is the log file from the last XBMC session.  If XBMC crashes AND you have restarted it before viewing the log, this is the one you want.
*'''xbmc.old.log''' - This is the log file from the last XBMC session.  If XBMC crashes AND you have restarted it before viewing the log, this is the one you want.
*{{frodo note|special://logpath available in nightlies/Pre-Frodo since Aug 5th see [[Special_protocol]]}}
*{{frodo note|special://logpath available in nightlies/Pre-Frodo since Aug 5th see [[Special_protocol]]}}


===Location===
==='''Location'''===
''xbmc.log'' and ''xbmc.old.log'' are located here, depending on your platform:
''xbmc.log'' and ''xbmc.old.log'' are located here, depending on your platform:
{| class="wikitable"
{|class="wikitable" border="1" cellpadding="5" cellspacing="20"
|'''Android''' || external storage/sdcard at: Android/data/org.xbmc.xbmc/files/.xbmc/temp/
|-style="background: lightgrey;"
|'''Operative system''' || '''File/Folder Paths'''
|-
|-
|'''iOS''' (ATV2/iPad/iPhone) || /private/var/mobile/Library/Preferences/xbmc.log
|'''Android''' || external storage/sdcard at: Android/data/org.xbmc.xbmc/files/.xbmc/temp/xbmc.log
|-
|-
|'''Linux''' || /home/''<username>''/.xbmc/temp/
|'''iOS''' Varied || /private/var/mobile/Library/Preferences/xbmc.log
|-
|-
|'''Mac OS X''' || /Users/''<username>''/Library/Logs/
|'''Linux''' || $HOME/.xbmc/temp/xbmc.log
|-
|-
|'''Windows''' ||%APPDATA%\XBMC\
|'''Mac OS X''' || /Users/''<username>''/Library/Logs/xbmc.log
|-
|'''Windows''' ||%APPDATA%\XBMC\xbmc.log
|}
|}


==Layout==
==='''Layout'''===
Each event is logged to one line of the XBMC log file which is formatted as follows...
Each event is logged to one line of the XBMC log file which is formatted as follows...
<pre>[TIMESTAMP] T:[THREADID] M:[FREEMEM] [LEVEL]: [MESSAGE]</pre>
<pre>[TIMESTAMP] T:[THREADID] M:[FREEMEM] [LEVEL]: [MESSAGE]</pre>
Line 86: Line 89:
*'''MESSAGE''' - A brief description and/or important information about the event.
*'''MESSAGE''' - A brief description and/or important information about the event.


==Log Levels==
==='''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.
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.
===Severity Levels===
==='''Severity Levels'''===
In order from least to most severe...
In order from least to most severe...
*'''DEBUG''' - In depth information about the status of XBMC.  This information can pretty much only be deciphered by a developer or long time XBMC power user.
*'''DEBUG''' - In depth information about the status of XBMC.  This information can pretty much only be deciphered by a developer or long time XBMC power user.
Line 97: Line 100:
*'''FATAL''' - We're screwed.  XBMC is about to crash.
*'''FATAL''' - We're screwed.  XBMC is about to crash.


===Log File Control Levels===
==='''Log File Control Levels'''===
In order from least to most information provided...
In order from least to most information provided...
*'''None''' - No logging will occur.  ''xbmc.log'' will likely be created but should remain empty.
*'''None''' - No logging will occur.  ''xbmc.log'' will likely be created but should remain empty.
Line 105: Line 108:
*'''SMB Debug''' - Same as ''Debug w/ Visuals'' with the addition of ridiculous amounts of Samba debugging info.  Use this only if asked.  
*'''SMB Debug''' - Same as ''Debug w/ Visuals'' with the addition of ridiculous amounts of Samba debugging info.  Use this only if asked.  


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

Revision as of 00:13, 18 December 2012

Template:Advanced
Template:XBMC wiki toc 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.

Emblem-important-yellow.png WARNING - Exposed passwords:
For those who are posting logs to the Internet: 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 are using a password (since that in itself is information that may or may not be important), but without exposing it to the public.


Enable Debugging

There are two ways to control log output:

GUI Settings
most common method
In Settings -> System -> Debugging toggle the Enable debug logging setting.
advancedSettings.xml
You can set any of the five log levels using the <loglevel> tag in advancedsettings.xml. This is especially useful if XBMC is crashing during start-up and you are unable to turn debugging on via the GUI.
Example:
<loglevel hide="false">2</loglevel>

See also: here for details. Setting debug level like this will hide the GUI setting.

Template:Frodo box


After you have enabled debug logging, please restart xbmc so that the log contains full start-up information.

Debug log add-on

You can also 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/.xbmc/temp/xbmc.log | pastebinit

Submit the link you get in any forums discussion where you post about any problem.

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 spam's a lot of info to the log (unless of course this is where the problem is ;)).

*Always include the whole debug log.

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.

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

Log Files

  • xbmc.log - This is the log file of most recent (or currently running) XBMC session.
  • xbmc.old.log - This is the log file from the last XBMC session. If XBMC crashes AND you have restarted it before viewing the log, this is the one you want.
  • Template:Frodo note

Location

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

Operative system File/Folder Paths
Android external storage/sdcard at: Android/data/org.xbmc.xbmc/files/.xbmc/temp/xbmc.log
iOS Varied /private/var/mobile/Library/Preferences/xbmc.log
Linux $HOME/.xbmc/temp/xbmc.log
Mac OS X /Users/<username>/Library/Logs/xbmc.log
Windows %APPDATA%\XBMC\xbmc.log

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]
  • 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 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.

Severity Levels

In order from least to most severe...

  • DEBUG - In depth information about the status of XBMC. This information can pretty much only be deciphered by a developer or long time XBMC 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.
  • 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 XBMC 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. XBMC is about to crash.

Log File Control Levels

In order from least to most information provided...

  • None - No logging will occur. xbmc.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.

See also