start custom logger
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package paths
|
||||
|
||||
import (
|
||||
"epochsilicon/pkg/log"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"epochsilicon/pkg/utils"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
@@ -33,7 +33,7 @@ func SelectCrossOverPath(myWindow fyne.Window, crossoverPathLabel *widget.RichTe
|
||||
return
|
||||
}
|
||||
if uri == nil {
|
||||
log.Info().Msg("CrossOver path selection cancelled.")
|
||||
log.Info("CrossOver path selection cancelled.")
|
||||
updateAllStatuses()
|
||||
return
|
||||
}
|
||||
@@ -41,14 +41,14 @@ func SelectCrossOverPath(myWindow fyne.Window, crossoverPathLabel *widget.RichTe
|
||||
if filepath.Ext(selectedPath) == ".app" && utils.DirExists(selectedPath) {
|
||||
CrossoverPath = selectedPath
|
||||
PatchesAppliedCrossOver = false
|
||||
log.Info().Msgf("CrossOver path set to:", CrossoverPath)
|
||||
log.Infof("CrossOver path set to:", CrossoverPath)
|
||||
// Save to prefs
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.CrossOverPath = selectedPath
|
||||
utils.SavePrefs(prefs)
|
||||
} else {
|
||||
dialog.ShowError(fmt.Errorf("invalid selection: '%s'. Please select a valid .app bundle", selectedPath), myWindow)
|
||||
log.Info().Msgf("Invalid CrossOver path selected:", selectedPath)
|
||||
log.Infof("Invalid CrossOver path selected:", selectedPath)
|
||||
}
|
||||
updateAllStatuses()
|
||||
}, myWindow)
|
||||
@@ -61,7 +61,7 @@ func SelectEpochPath(myWindow fyne.Window, epochPathLabel *widget.RichText, upda
|
||||
return
|
||||
}
|
||||
if uri == nil {
|
||||
log.Info().Msg("Epoch path selection cancelled.")
|
||||
log.Info("Epoch path selection cancelled.")
|
||||
updateAllStatuses()
|
||||
return
|
||||
}
|
||||
@@ -69,14 +69,14 @@ func SelectEpochPath(myWindow fyne.Window, epochPathLabel *widget.RichText, upda
|
||||
if utils.DirExists(selectedPath) {
|
||||
EpochPath = selectedPath
|
||||
PatchesAppliedEpoch = false
|
||||
log.Info().Msgf("Epoch path set to:", EpochPath)
|
||||
log.Infof("Epoch path set to:", EpochPath)
|
||||
// Save to prefs
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.EpochPath = selectedPath
|
||||
utils.SavePrefs(prefs)
|
||||
} else {
|
||||
dialog.ShowError(fmt.Errorf("invalid selection: '%s' is not a valid directory", selectedPath), myWindow)
|
||||
log.Info().Msgf("Invalid Epoch path selected:", selectedPath)
|
||||
log.Infof("Invalid Epoch path selected:", selectedPath)
|
||||
}
|
||||
updateAllStatuses()
|
||||
}, myWindow)
|
||||
@@ -102,7 +102,7 @@ func CheckDefaultCrossOverPath() {
|
||||
if CrossoverPath == "" {
|
||||
if info, err := os.Stat(DefaultCrossOverPath); err == nil && info.IsDir() {
|
||||
CrossoverPath = DefaultCrossOverPath
|
||||
log.Info().Msgf("Pre-set CrossOver to default:", DefaultCrossOverPath)
|
||||
log.Infof("Pre-set CrossOver to default:", DefaultCrossOverPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user