Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logs] Add more info in game logs #3394

Merged
merged 2 commits into from
Jan 6, 2024
Merged

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Jan 6, 2024

This PR fixes #3187, and fixes #3186 and fixes #3104

This PR adds more information in the logs to make them more useful when users share them over Discord.

New info:

  • Name of the game/app
  • Runner
  • If it's native or not
  • Install dir
  • If the game is running in Desktop or Game mode (only on a Steamdeck)
  • If the EOS overlay is enabled or not (for epic games only)
  • If there are winetricks packages installed (for non-native games)
  • Also added a ===== End of game logs ===== line at the end so we know users didn't cut log when sharing

I also included a few extra changes that I needed:

  • I need the gameInfo in the log functions, so I had to update some code to handle game info instead of just app name
  • Nile setup function was running even with undefined GameInfo
  • I had to do a small refactor of the eos_overlay import because it was going in an import error
  • Moved the log of the setting inside the initLog function to do that also async

The log now looks like this:

Launching "A Short Hike" (legendary)
Native? No
Installed in: /home/ariel/Games/Heroic/AShortHike

System Info:
CPU: 16x AMD Ryzen 7 3700X 8-Core Processor
Memory: 16.63 GB (used: 8.66 GB)
GPUs:
  GPU 0:
    Name: Advanced Micro Devices, Inc. [AMD/ATI] RX 5700 XT RAW II
    IDs: D=731f V=1002 SD=5701 SV=1682
    Driver: amdgpu
OS: Linux Mint 21.2 (Victoria) (linux)

The current system is not a Steam Deck
We are not running inside a Flatpak container

Software Versions:
  Heroic: 2.11.0 Kumachi
  Legendary: 0.20.34 Direct Intervention
  gogdl: 0.7.3
  Nile: 1.0.0 Jonathan Joestar

Game Settings: {
	"autoInstallDxvk": true,
	"autoInstallVkd3d": true,
	"preferSystemLibs": false,
	"enableEsync": true,
	"enableFsync": true,
	"nvidiaPrime": false,
	"enviromentOptions": [],
	"wrapperOptions": [],
	"showFps": false,
	"showMangohud": false,
	"useGameMode": false,
	"language": "",
	"wineVersion": {
		"bin": "/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/bin/wine",
		"name": "Wine - Wine-GE-Proton8-25",
		"type": "wine",
		"lib": "/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib64",
		"lib32": "/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib",
		"wineserver": "/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/bin/wineserver"
	},
	"winePrefix": "/home/ariel/Games/Heroic/Prefixes/A Short Hike",
	"wineCrossoverBottle": ""
}

EOS Overlay enabled? No
Winetricks packages installed: physx

Game launched at: Fri Jan 05 2024 23:00:30 GMT-0300 (hora estándar de Argentina)

Launch Command: HEROIC_APP_NAME=d6407c9e6fd54cb492b8c6635480d792 HEROIC_APP_RUNNER=legendary HEROIC_APP_SOURCE=epic LD_PRELOAD= DOTNET_BUNDLE_EXTRACT_BASE_DIR= DOTNET_ROOT= WINEPREFIX="/home/ariel/Games/Heroic/Prefixes/A Short Hike" WINEDLLOVERRIDES=winemenubuilder.exe=d WINE_FULLSCREEN_FSR=0 WINEESYNC=1 WINEFSYNC=1 ORIG_LD_LIBRARY_PATH= LD_LIBRARY_PATH=/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib64:/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib GST_PLUGIN_SYSTEM_PATH_1_0=/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib64/gstreamer-1.0:/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib/gstreamer-1.0 WINEDLLPATH=/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib64/wine:/home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/lib/wine /home/ariel/dev/oss/HeroicGamesLauncher/public/bin/linux/legendary launch d6407c9e6fd54cb492b8c6635480d792 --wine /home/ariel/.config/heroic/tools/wine/Wine-GE-Proton8-25/bin/wine --language en

Game Log:
...

Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Jan 6, 2024
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team January 6, 2024 02:09
join(legendaryConfigPath, 'overlay_version.json')
const installedVersionPath = () =>
join(legendaryConfigPath, 'overlay_install.json')
const defaultInstallPath = () => join(toolsPath, 'eos_overlay')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved these consts into functions to avoid an import loop

if (!gameInfo) {
logError([`Could not find game info for ${appName}. Skipping setup`])
return
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't run setup steps if we can't find game info

Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arielj arielj merged commit e9f1a0e into async-game-logs Jan 6, 2024
1 check passed
@arielj arielj deleted the add-more-info-to-logs branch January 6, 2024 23:11
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants