start custom logger
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"epochsilicon/pkg/log"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -27,7 +27,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.EnableMetalHud = checked
|
||||
utils.SavePrefs(prefs)
|
||||
log.Debug().Msgf("Metal HUD enabled: %v", launcher.EnableMetalHud)
|
||||
log.Debugf("Metal HUD enabled: %v", launcher.EnableMetalHud)
|
||||
})
|
||||
metalHudCheckbox.SetChecked(prefs.EnableMetalHud)
|
||||
launcher.EnableMetalHud = prefs.EnableMetalHud
|
||||
@@ -37,7 +37,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.ShowTerminalNormally = checked
|
||||
utils.SavePrefs(prefs)
|
||||
log.Debug().Msgf("Show terminal normally: %v", checked)
|
||||
log.Debugf("Show terminal normally: %v", checked)
|
||||
})
|
||||
showTerminalCheckbox.SetChecked(prefs.ShowTerminalNormally)
|
||||
|
||||
@@ -47,7 +47,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.AutoDeleteWdb = checked
|
||||
utils.SavePrefs(prefs)
|
||||
log.Debug().Msgf("Auto-delete WDB enabled: %v", launcher.AutoDeleteWdb)
|
||||
log.Debugf("Auto-delete WDB enabled: %v", launcher.AutoDeleteWdb)
|
||||
})
|
||||
autoDeleteWdbCheckbox.SetChecked(prefs.AutoDeleteWdb)
|
||||
launcher.AutoDeleteWdb = prefs.AutoDeleteWdb
|
||||
@@ -69,7 +69,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.EnvironmentVariables = text
|
||||
utils.SavePrefs(prefs)
|
||||
log.Debug().Msgf("Environment variables updated: %v", launcher.CustomEnvVars)
|
||||
log.Debugf("Environment variables updated: %v", launcher.CustomEnvVars)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ func createBottomBar(myWindow fyne.Window) fyne.CanvasObject {
|
||||
githubURL := "https://git.burkey.co/eburk/epochsilicon"
|
||||
parsedURL, err := url.Parse(githubURL)
|
||||
if err != nil {
|
||||
log.Debug().Msgf("Error parsing git URL: %v", err)
|
||||
log.Debugf("Error parsing git URL: %v", err)
|
||||
return
|
||||
}
|
||||
fyne.CurrentApp().OpenURL(parsedURL)
|
||||
@@ -198,7 +198,7 @@ func createWineRegistryComponents() {
|
||||
}()
|
||||
|
||||
if err := utils.SetOptionAsAltEnabled(true); err != nil {
|
||||
log.Debug().Msgf("Failed to enable Option-as-Alt mapping: %v", err)
|
||||
log.Debugf("Failed to enable Option-as-Alt mapping: %v", err)
|
||||
// Update UI on main thread
|
||||
fyne.Do(func() {
|
||||
stopPulsingEffect()
|
||||
@@ -206,7 +206,7 @@ func createWineRegistryComponents() {
|
||||
})
|
||||
time.Sleep(2 * time.Second) // Show error briefly
|
||||
} else {
|
||||
log.Debug().Msgf("Successfully enabled Option-as-Alt mapping")
|
||||
log.Debugf("Successfully enabled Option-as-Alt mapping")
|
||||
// Update preferences
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.RemapOptionAsAlt = true
|
||||
@@ -240,7 +240,7 @@ func createWineRegistryComponents() {
|
||||
}()
|
||||
|
||||
if err := utils.SetOptionAsAltEnabled(false); err != nil {
|
||||
log.Debug().Msgf("Failed to disable Option-as-Alt mapping: %v", err)
|
||||
log.Debugf("Failed to disable Option-as-Alt mapping: %v", err)
|
||||
// Update UI on main thread
|
||||
fyne.Do(func() {
|
||||
stopPulsingEffect()
|
||||
@@ -248,7 +248,7 @@ func createWineRegistryComponents() {
|
||||
})
|
||||
time.Sleep(2 * time.Second) // Show error briefly
|
||||
} else {
|
||||
log.Debug().Msgf("Successfully disabled Option-as-Alt mapping")
|
||||
log.Debugf("Successfully disabled Option-as-Alt mapping")
|
||||
// Update preferences
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.RemapOptionAsAlt = false
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"epochsilicon/pkg/log"
|
||||
"epochsilicon/pkg/paths"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
@@ -34,7 +34,7 @@ func createLogoContainer() fyne.CanvasObject {
|
||||
// Load the application logo
|
||||
logoResource, err := fyne.LoadResourceFromPath("Icon.png")
|
||||
if err != nil {
|
||||
log.Debug().Msgf("Warning: could not load logo: %v", err)
|
||||
log.Debugf("Warning: could not load logo: %v", err)
|
||||
}
|
||||
|
||||
// Create the logo image with a smaller fixed size since we have a header now
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"epochsilicon/pkg/log"
|
||||
"git.burkey.co/eburk/epochcli/pkg/epoch"
|
||||
"github.com/rs/zerolog/log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@@ -110,10 +110,10 @@ func updateEpochStatus() {
|
||||
epochPatchesApplied := false
|
||||
stats, err := epoch.Update(paths.EpochPath, false, true, true)
|
||||
if err != nil {
|
||||
log.Debug().Msgf("Failed to get download Epoch patches: %v", err)
|
||||
log.Debugf("Failed to get download Epoch patches: %v", err)
|
||||
}
|
||||
if stats.Outdated == 0 {
|
||||
log.Debug().Msg("Nothing is outdated")
|
||||
log.Debug("Nothing is outdated")
|
||||
epochPatchesApplied = true
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"epochsilicon/pkg/log"
|
||||
"fmt"
|
||||
"github.com/rs/zerolog/log"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -105,7 +105,7 @@ func ShowUpdateDialog(updateInfo *utils.UpdateInfo, currentVersion string, myWin
|
||||
|
||||
if err != nil {
|
||||
progressLabel.SetText(fmt.Sprintf("Download failed: %v", err))
|
||||
log.Debug().Msgf("Download failed: %v", err)
|
||||
log.Debugf("Download failed: %v", err)
|
||||
|
||||
// Re-enable close button
|
||||
d.SetButtons([]fyne.CanvasObject{
|
||||
@@ -123,7 +123,7 @@ func ShowUpdateDialog(updateInfo *utils.UpdateInfo, currentVersion string, myWin
|
||||
err = utils.InstallUpdate(downloadPath)
|
||||
if err != nil {
|
||||
progressLabel.SetText(fmt.Sprintf("Installation failed: %v", err))
|
||||
log.Debug().Msgf("Installation failed: %v", err)
|
||||
log.Debugf("Installation failed: %v", err)
|
||||
|
||||
// Re-enable close button
|
||||
fyne.DoAndWait(func() {
|
||||
|
Reference in New Issue
Block a user