start custom logger

This commit is contained in:
2025-07-23 08:59:16 -07:00
parent 8b5be228fe
commit a1f46438d0
14 changed files with 253 additions and 196 deletions

19
main.go
View File

@@ -1,21 +1,16 @@
package main
import (
"epochsilicon/pkg/log"
"epochsilicon/pkg/service"
"epochsilicon/pkg/ui"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"strings"
)
const appVersion = "1.0.0"
func init() {
zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
}
const appVersion = "1.0.1"
func main() {
PEApp := app.NewWithID("com.burkey.epochsilicon")
@@ -27,21 +22,21 @@ func main() {
prefs, _ := utils.LoadPrefs()
updateInfo, updateAvailable, err := utils.CheckForUpdateWithAssets(appVersion)
if err != nil {
log.Debug().Msgf("Failed to check for updates: %v", err)
log.Debugf("Failed to check for updates: %v", err)
return
}
if !updateAvailable {
log.Debug().Msgf("No updates available")
log.Debugf("No updates available")
return
}
latestVersion := strings.TrimPrefix(updateInfo.TagName, "v")
log.Debug().Msgf("Update available: current=%s, latest=%s", appVersion, latestVersion)
log.Debugf("Update available: current=%s, latest=%s", appVersion, latestVersion)
// Skip if user has suppressed this version
if prefs.SuppressedUpdateVersion == latestVersion {
log.Debug().Msgf("Update suppressed by user: %s", latestVersion)
log.Debugf("Update suppressed by user: %s", latestVersion)
return
}
@@ -54,7 +49,7 @@ func main() {
// Set up cleanup when window closes
PEWindow.SetCloseIntercept(func() {
log.Debug().Msg("Application closing, cleaning up RosettaX87 service...")
log.Debug("Application closing, cleaning up RosettaX87 service...")
service.CleanupService()
PEApp.Quit()
})