lib/fs: Introduce walkfs debug facility (#4712)
This commit is contained in:
@@ -18,5 +18,12 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
l.SetDebug("fs", strings.Contains(os.Getenv("STTRACE"), "fs") || os.Getenv("STTRACE") == "all")
|
||||
logger.DefaultLogger.NewFacility("walkfs", "Filesystem access while walking")
|
||||
switch {
|
||||
case strings.Contains(os.Getenv("STTRACE"), "walkfs") || os.Getenv("STTRACE") == "all":
|
||||
l.SetDebug("walkfs", true)
|
||||
fallthrough
|
||||
case strings.Contains(os.Getenv("STTRACE"), "fs"):
|
||||
l.SetDebug("fs", true)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user