From 42e0b168e3d75389dfb968aebf9f5629d64782f9 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 21 Oct 2024 20:47:02 +0900 Subject: fmsg: produce all output through fmsg The behaviour of print functions from package fmt is not thread safe. Functions provided by fmsg wrap around Logger methods. This makes prefix much cleaner and makes it easy to deal with future changes to logging. Signed-off-by: Ophestra Umiker --- internal/app/seal.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/app/seal.go') diff --git a/internal/app/seal.go b/internal/app/seal.go index 7de6aecb..f0fe5582 100644 --- a/internal/app/seal.go +++ b/internal/app/seal.go @@ -14,7 +14,6 @@ import ( "git.ophivana.moe/security/fortify/internal/shim" "git.ophivana.moe/security/fortify/internal/state" "git.ophivana.moe/security/fortify/internal/system" - "git.ophivana.moe/security/fortify/internal/verbose" ) const ( @@ -152,7 +151,7 @@ func (a *app) Seal(config *Config) error { // map sandbox config to bwrap if config.Confinement.Sandbox == nil { - verbose.Println("sandbox configuration not supplied, PROCEED WITH CAUTION") + fmsg.VPrintln("sandbox configuration not supplied, PROCEED WITH CAUTION") // permissive defaults conf := &SandboxConfig{ @@ -242,7 +241,7 @@ func (a *app) Seal(config *Config) error { } // verbose log seal information - verbose.Println("created application seal as user", + fmsg.VPrintln("created application seal as user", seal.sys.user.Username, "("+seal.sys.user.Uid+"),", "method:", config.Method+",", "launcher:", seal.toolPath+",", -- cgit v1.3.1