From e599b5583dd821ed26bdfc01f7f67d4a317b9843 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 16 Feb 2025 17:26:09 +0900 Subject: fmsg: implement suspend in writer This removes the requirement to call fmsg.Exit on every exit path, and enables direct use of the "log" package. However, fmsg.BeforeExit is still encouraged when possible to catch exit on suspended output. Signed-off-by: Ophestra --- internal/linux/interface.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/linux/interface.go') diff --git a/internal/linux/interface.go b/internal/linux/interface.go index 68129363..cf25ecb1 100644 --- a/internal/linux/interface.go +++ b/internal/linux/interface.go @@ -54,7 +54,7 @@ type Paths struct { func CopyPaths(os System, v *Paths) { v.SharePath = path.Join(os.TempDir(), "fortify."+strconv.Itoa(os.Geteuid())) - fmsg.VPrintf("process share directory at %q", v.SharePath) + fmsg.Verbosef("process share directory at %q", v.SharePath) if r, ok := os.LookupEnv(xdgRuntimeDir); !ok || r == "" || !path.IsAbs(r) { // fall back to path in share since fortify has no hard XDG dependency @@ -65,5 +65,5 @@ func CopyPaths(os System, v *Paths) { v.RunDirPath = path.Join(v.RuntimePath, "fortify") } - fmsg.VPrintf("runtime directory at %q", v.RunDirPath) + fmsg.Verbosef("runtime directory at %q", v.RunDirPath) } -- cgit v1.3.1