Turn on logging to file

This commit is contained in:
Роман Бойков 2026-04-02 14:32:17 +03:00
parent b3b76b0645
commit 2adffb5a21
2 changed files with 8 additions and 3 deletions

3
okemu.log Normal file
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

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
}