refactor: replace log statements with fmt for console output
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package disk
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"s1d3sw1ped/SteamCache2/vfs"
|
||||
@@ -53,14 +53,14 @@ func NewSkipInit(root string, capacity int64) *DiskFS {
|
||||
}
|
||||
|
||||
func (d *DiskFS) init() {
|
||||
// log.Printf("DiskFS(%s, %s) init", d.root, units.HumanSize(float64(d.capacity)))
|
||||
// fmt.Printf("DiskFS(%s, %s) init", d.root, units.HumanSize(float64(d.capacity)))
|
||||
|
||||
tstart := time.Now()
|
||||
|
||||
d.walk(d.root)
|
||||
d.sg.Wait()
|
||||
|
||||
log.Printf("DiskFS(%s, %s) init took %v", d.root, units.HumanSize(float64(d.capacity)), time.Since(tstart))
|
||||
fmt.Printf("DiskFS(%s, %s) init took %v", d.root, units.HumanSize(float64(d.capacity)), time.Since(tstart))
|
||||
}
|
||||
|
||||
func (d *DiskFS) walk(path string) {
|
||||
@@ -86,7 +86,7 @@ func (d *DiskFS) walk(path string) {
|
||||
d.info[k] = vfs.NewFileInfoFromOS(info, k)
|
||||
d.mu.Unlock()
|
||||
|
||||
// log.Printf("DiskFS(%s, %s) init: %s", d.root, units.HumanSize(float64(d.capacity)), npath)
|
||||
// fmt.Printf("DiskFS(%s, %s) init: %s", d.root, units.HumanSize(float64(d.capacity)), npath)
|
||||
return nil
|
||||
})
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user