summaryrefslogtreecommitdiff
path: root/internal/io
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-10-06 09:50:41 +0300
committerPaul Buetow <paul@buetow.org>2021-10-06 09:50:41 +0300
commitfab5dc3e70434ea0abc7a0976487a1973b662331 (patch)
tree61a06e166f225b69f09966e81ae725f960fd80be /internal/io
parent9f395a03f25941d8ed98ec43035688daa1e8877f (diff)
enable faster shutdown - useful for dgrep/dmap and dcat commands
Diffstat (limited to 'internal/io')
-rw-r--r--internal/io/dlog/dlog.go2
-rw-r--r--internal/io/fs/permissions/permission.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/internal/io/dlog/dlog.go b/internal/io/dlog/dlog.go
index db99307..a17d6e9 100644
--- a/internal/io/dlog/dlog.go
+++ b/internal/io/dlog/dlog.go
@@ -201,6 +201,8 @@ func (d *DLog) Debug(args ...interface{}) string {
}
func (d *DLog) Trace(args ...interface{}) string {
+ _, file, line, _ := runtime.Caller(1)
+ args = append(args, fmt.Sprintf("at %s:%d", file, line))
return d.log(TRACE, args)
}
diff --git a/internal/io/fs/permissions/permission.go b/internal/io/fs/permissions/permission.go
index bbcb74e..e80dbb2 100644
--- a/internal/io/fs/permissions/permission.go
+++ b/internal/io/fs/permissions/permission.go
@@ -9,6 +9,6 @@ import (
// ToRead is to check whether user has read permissions to a given file.
func ToRead(user, filePath string) (bool, error) {
// Only implemented for Linux, always expect true
- dlog.Common.Warn(user, filePath, "Not performing ACL check, not supported on this platform")
+ dlog.Common.Warn(user, filePath, "Not performing ACL check as not compiled in")
return true, nil
}