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

Fix logging with proton #4113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/backend/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -924,13 +924,24 @@ function setupWineEnvVars(gameSettings: GameSettings, gameId = '0') {
// This sets the name of the log file given when setting PROTON_LOG=1
ret.SteamGameId = `heroic-${gameId}`
ret.PROTON_LOG_DIR = flatPakHome

// Only set WINEDEBUG if PROTON_LOG is set since Proton will also log if just WINEDEBUG is set
if (
gameSettings?.enviromentOptions?.find((env) => env.key === 'PROTON_LOG')
) {
// Stop Proton from overriding WINEDEBUG; this prevents logs growing to a few GB for some games
ret.WINEDEBUG = 'timestamp'
// add back default wine/dxvk debug logging
if (gameSettings?.verboseLogs) {
if (
!gameSettings?.enviromentOptions.find((env) => env.key === 'WINEDEBUG')
)
ret.WINEDEBUG = '+fixme'
if (
!gameSettings?.enviromentOptions.find(
(env) => env.key === 'DXVK_LOG_LEVEL'
)
)
ret.DXVK_LOG_LEVEL = 'info'
if (
!gameSettings?.enviromentOptions.find(
(env) => env.key === 'VKD3D_DEBUG'
)
)
ret.VKD3D_DEBUG = 'fixme'
}
}
if (!gameSettings.preferSystemLibs && wineVersion.type === 'wine') {
Expand Down
2 changes: 1 addition & 1 deletion src/backend/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function initLogger() {

if (logsDisabled) {
logWarning(
'IMPORTANT: Logs are disabled. Enable logs before reporting any issue.',
'IMPORTANT: Logs are disabled. Enable logs before reporting any issue.\n',
{
forceLog: true
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/storeManagers/gog/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ export async function launch(
if (!gameSettings.verboseLogs) {
appendGamePlayLog(
gameInfo,
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.'
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.\n'
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/backend/storeManagers/legendary/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ export async function launch(
if (!gameSettings.verboseLogs) {
appendGamePlayLog(
gameInfo,
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.'
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.\n'
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/backend/storeManagers/nile/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export async function launch(
if (!gameSettings.verboseLogs) {
appendGamePlayLog(
gameInfo,
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.'
'IMPORTANT: Logs are disabled. Enable verbose logs before reporting an issue.\n'
)
}

Expand Down
Loading