Turn on logging to file

This commit is contained in:
romych committed 2026-04-02 14:32:17 +03:00
1 parent b3b76b0645
commit 2adffb5a21
2 files changed
+8 -3

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
2026-04-02T14:27:10[I][zrcp.go:117]: Ready for debugger connections on localhost:10001
2026-04-02T14:29:15[I][zrcp.go:117]: Ready for debugger connections on localhost:10001
2026-04-02T14:30:16[I][zrcp.go:117]: Ready for debugger connections on localhost:10001
+5 -3
View File
@@ -55,7 +55,8 @@ func main() {
conf := config.GetConfig()
// Reconfigure logging by config values
// logger.ReconfigureLogging(conf)
logger.ReconfigureLogging(conf)
if runtime.GOOS == "windows" {
cpuClkPeriod.Store(windowsCpuClkPeriod)
timerClkPeriod.Store(windowsTimerClkPeriod)
@@ -86,6 +87,7 @@ func main() {
(*w).ShowAndRun()
computer.AutoSaveFloppy()
logger.CloseLogs()
}
func screen(ctx context.Context, computer *okean240.ComputerType, raster *canvas.Raster, label *widget.Label) {
@@ -158,8 +160,8 @@ func calcDelta(currentFreq float64, destFreq float64) int64 {
delta := int64(math.Round(math.Abs(destFreq-currentFreq) * 100))
if delta < 1 {
return 1
} else if delta > 10 {
return 10
} else if delta > 8 {
return 8
}
return delta
}