From b96e3ee2717531e842c492c3a6799d1d0c3e51cb Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 28 Feb 2018 09:02:18 +0100 Subject: tlog: stop embedding log.Logger to prevent mistakes A few places have called tlog.Warn.Print, which directly calls into log.Logger due to embedding, losing all features of tlog. Stop embedding log.Logger to make sure the internal functions cannot be called accidentially and fix (several!) instances that did. --- internal/fusefrontend/file_allocate_truncate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/fusefrontend') diff --git a/internal/fusefrontend/file_allocate_truncate.go b/internal/fusefrontend/file_allocate_truncate.go index 86aee8e..67254dc 100644 --- a/internal/fusefrontend/file_allocate_truncate.go +++ b/internal/fusefrontend/file_allocate_truncate.go @@ -39,7 +39,7 @@ var allocateWarnOnce sync.Once func (f *file) Allocate(off uint64, sz uint64, mode uint32) fuse.Status { if mode != FALLOC_DEFAULT && mode != FALLOC_FL_KEEP_SIZE { f := func() { - tlog.Warn.Print("fallocate: only mode 0 (default) and 1 (keep size) are supported") + tlog.Warn.Printf("fallocate: only mode 0 (default) and 1 (keep size) are supported") } allocateWarnOnce.Do(f) return fuse.Status(syscall.EOPNOTSUPP) -- cgit v1.2.3