Generating Logs

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 via Menu
First We'll need to activate the Advanced Settings:
1. Go to settings
2. Enter at "User Interface"
3. Activate "Show Advanced Settings"
Next We'll activate the logging option:
1. Go to settings if you weren't there
2. Enter at "Logging"
3. Activate "Log to File"
4.(optional) Costumize Core & Frontend Logging Level & if you want timestamps or performance counters on your log
5. Acttivate "Logging Verbosity"

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 RetroArch, a file called retroarch-log.txt should be stored in the folder.



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 Switch

You need to have your console and your PC on the same local network.

You need to have nxlink installed on your PC to generate logs. The devkitpro environment has it, see the switchbrew wiki for instructions on how to install it.

Run the homebrew menu on your console, and press the Y button to open the netloader prompt.

Take the NRO of the core you want to launch on your PC. Open a terminal and type this command in :

nxlink /path/to/your/core.nro -s

Where /path/to/your/core.nro is the path to the core you want to generate logs from, on your PC. Be careful as it will overwrite any homebrew with the same name on your SD card !

That will send the homebrew and run it on your console. Logs will be shown on the terminal you ran the command from.

If you want to redirect logs to the file libnx.logs, use this command instead :

nxlink /path/to/your/core.nro -s > libnx.logs 2>&1

Post a Comment

0 Comments