updated logging, added theming, added settings button

This commit is contained in:
partisan 2024-08-11 21:45:52 +02:00
parent 51b2ef43bc
commit ca15fb7ec5
25 changed files with 384 additions and 62 deletions

View file

@ -2,7 +2,6 @@ package main
import (
"fmt"
"log"
"sync"
"time"
@ -143,7 +142,7 @@ func (rc *ResultsCache) checkAndCleanCache() {
func (rc *ResultsCache) memoryUsage() float64 {
v, err := mem.VirtualMemory()
if err != nil {
log.Printf("Failed to get memory info: %v", err)
printErr("Failed to get memory info: %v", err)
return 0
}
@ -167,7 +166,7 @@ func (rc *ResultsCache) cleanOldestItems() {
if oldestKey != "" {
delete(rc.results, oldestKey)
log.Printf("Removed oldest cache item: %s", oldestKey)
printDebug("Removed oldest cache item: %s", oldestKey)
} else {
break
}