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. --- mount.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mount.go') diff --git a/mount.go b/mount.go index 9560efe..21a70af 100644 --- a/mount.go +++ b/mount.go @@ -89,7 +89,7 @@ func doMount(args *argContainer) { defer func() { err = sock.Close() if err != nil { - tlog.Warn.Print(err) + tlog.Warn.Printf("ctlsock close: %v", err) } }() } @@ -378,7 +378,7 @@ func handleSigint(srv *fuse.Server, mountpoint string) { <-ch err := srv.Unmount() if err != nil { - tlog.Warn.Print(err) + tlog.Warn.Printf("handleSigint: srv.Unmount returned %v", err) if runtime.GOOS == "linux" { // MacOSX does not support lazy unmount tlog.Info.Printf("Trying lazy unmount") -- cgit v1.2.3