refactor: replace log statements with fmt for console output
All checks were successful
Release / Build versioned release (push) Successful in 16s

This commit is contained in:
2025-01-21 20:56:58 -06:00
parent c370e80888
commit 62f7a38295
3 changed files with 16 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
package steamcache
import (
"log"
"fmt"
"s1d3sw1ped/SteamCache2/vfs"
"s1d3sw1ped/SteamCache2/vfs/cachestate"
"time"
@@ -17,7 +17,7 @@ func randomgc(vfss vfs.VFS, stats []*vfs.FileInfo) int64 {
err := vfss.Delete(randfile.Name())
if err != nil {
// If we failed to delete the file, log it and return 0
// log.Printf("Failed to delete %s: %v", randfile.Name(), err)
// fmt.Printf("Failed to delete %s: %v", randfile.Name(), err)
return 0
}
@@ -39,7 +39,7 @@ func memorygc(vfss vfs.VFS, size int) {
}
}
log.Printf("GC of %s took %v to reclaim %s by deleting %d files", vfss.Name(), time.Since(tstart), units.HumanSize(float64(reclaimed)), deletions)
fmt.Printf("GC of %s took %v to reclaim %s by deleting %d files", vfss.Name(), time.Since(tstart), units.HumanSize(float64(reclaimed)), deletions)
}
func diskgc(vfss vfs.VFS, size int) {
@@ -57,7 +57,7 @@ func diskgc(vfss vfs.VFS, size int) {
}
}
log.Printf("GC of %s took %v to reclaim %s by deleting %d files", vfss.Name(), time.Since(tstart), units.HumanSize(float64(reclaimed)), deletions)
fmt.Printf("GC of %s took %v to reclaim %s by deleting %d files", vfss.Name(), time.Since(tstart), units.HumanSize(float64(reclaimed)), deletions)
}
func cachehandler(fi *vfs.FileInfo, cs cachestate.CacheState) bool {