Generating Logs

What are logs? Why are they so important?

RetroArch and its underlying libretro technology is designed to run on many different combinations of hardware, operating system, libretro core, and content. It is not possible for a volunteer-based open source project to test all possible combinations.

The answer to this dilemma involves "logs", which RetroArch and other libretro software use to record essential information about your system and its function that other users and volunteers need in order to help troubleshoot problems and improve compatibility with new systems.


Generating Logs

Generating Logs in Lakka

Please see the Troubleshooting Lakka doc.

Generating Logs in Linux

RetroArch logs

  1. Open a terminal.
  2. Navigate to the RetroArch folder with the cd command.
  3. Start retroarch in 'verbose' mode with this command:
    retroarch --menu --verbose >> retroarch.log 2>&1
  4. Once you exit RetroArch, a file called retroarch.log should be stored in your home directory.

Graphic card logs

lspci -nnk | grep -A 3 VGA will give information about your graphic card.

Audio device logs

aplay -L enumerates audio devices which have been detected.

Input device logs

lsusb lists all devices attached via USB

dmesg displays all messages from the kernel ring buffer which typically is holding the messages generated by the Linux kernel from the boot process. The dmesg log lists each hardware device that the kernel detected along with information on how the device was configured by the system.

Generating Logs in Windows

If you installed RetroArch:

  1. Open the Windows start menu
  2. Search and open RetroArch (log to file)

Once you exit RetroArch, a file called retroarch-log.txt should be stored in the RetroArch folder, in order to retrieve it:

  1. Open the windows start menu
  2. Search and open RetroArch Data Folder
  3. Find retroarch-log.txt

If you haven't installed RetroArch and have a folder with it:

Tip

You can hold shift then right click on the folder that contains retroarch.exe
Select Open PowerShell window here.
Then jump to step 3.

  1. Open a console window with the cmd command, found either in the Start Menu or through use of the Windows "Run" menu.
  2. Navigate to the RetroArch folder using the cd command.
  3. Launch RetroArch with this commandline:
    .\retroarch.exe --log-file .\retroarch-log.txt -v
  4. Once you exit RetrorArch, a file called retroarch-log.txt should be stored in the folder.

Log with debug symbols

Optionally or if asked, launch RetroArch with debug symbols with this commandline:
.\retroarch_debug.exe --log-file .\retroarch-log.txt -v

Generating Logs in OS X

  1. Open a console window with the OS X "Terminal" app.
  2. Navigate to the RetroArch folder using the cd command.
  3. Launch RetroArch with this commandline:
    retroarch --menu --verbose --log-file ~/retroarch.log
  4. Once you exit RetroArch, a file called retroarch.log should be stored in your home directory.

Generating Logs in Android

There is a range of variation in the logging systems available to Android device depending on the combination of hardware and operating system in use. There are two general approaches to generating logs in Android: tethering to a PC via a USB cable or using a logcat app.

Generating Logs via USB Tether

Prerequisites: Linux, Windows or Mac PC USB cable for your device

Instructions:

  • Install your device driver for using adb on your PC from http://developer.android.com/tools/extras/oem-usb.html
  • Download the adb executable for your OS -- it can be downloaded as part of the full Android SDK, but you might also be able to find the adb executable individually.
  • Connect your Android device to the PC via USB cable.
  • Enable the developer options on the Android.
  • Enable USB debugging on the Android.
  • Open a command prompt (Windows) or terminal (Linux/OS X) and navigate to the directory where the adb executable is located using the cd command. On Windows: Windows Key + R > type cmd > press Enter. On OS X: Type Terminal into Spotlight and open it. Alternately, on Windows: Go to the directory where you downloaded the adb executable, Shift+Right Click and select Open Console (or similar) | On Linux / OS X: Right Click in the directory and select Open Terminal here
  • Type in your console window: adb devices to verify your device is properly connected.
  • If your device is selected, type in adb logcat to show the logcat, aka stacktrace.
  • Reproduce your issue on your device.
  • Paste the contents of your console window into a Github Gist to share on the forums or github.

Based on Stackexchange posts by Leandros and Nicolas Raoul.

Generating Logs via Android App

Gathering log files in Android requires a third-party app that can interface with the logcat system. Many free apps are available via Android's "Play Store" system.

Generating Logs in iOS

At the moment there are no logging docs available for iOS. Please feel free to post about your situation in the libretro forums.

Generating Logs with Nintendo Consoles

At the moment there are no logging docs available for Nintendo consoles. Please feel free to post about your situation in the libretro forums.

Generating Logs with PlayStation Consoles

At the moment there are no logging docs available for PlayStation consoles. Please feel free to post about your situation in the libretro forums.


Posting Logs in the Forum and Github

Generally, log files are lengthy which make them difficult to read when they're pasted directly into a post on the forums or github. If your log file is more than six or seven lines long, you will be asked to post a link to it instead.

One free and straightforward system for posting and sharing logs is Github Gist. You can paste the contents of a log file, or the log file itself, into the Gist website. After you log has been added to the Gist, press the Create Public Gist button to create a shareable link.