From: Sergey Matveev Date: Thu, 11 Mar 2021 09:05:28 +0000 (+0300) Subject: Remove excess %s in log messages X-Git-Tag: v6.2.1^2~1 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=49eb94bbf7a0c157764e423f6b5e4a21143e9dd8;p=nncp.git Remove excess %s in log messages --- diff --git a/src/lockdir.go b/src/lockdir.go index 2219d1b..902ec22 100644 --- a/src/lockdir.go +++ b/src/lockdir.go @@ -36,14 +36,14 @@ func (ctx *Ctx) LockDir(nodeId *NodeId, lockCtx string) (*os.File, error) { ) if err != nil { ctx.LogE("lockdir-open", LEs{{"Path", lockPath}}, err, func(les LEs) string { - return "Locking directory: opening %s" + lockPath + return "Locking directory: opening " + lockPath }) return nil, err } err = unix.Flock(int(dirLock.Fd()), unix.LOCK_EX|unix.LOCK_NB) if err != nil { ctx.LogE("lockdir-flock", LEs{{"Path", lockPath}}, err, func(les LEs) string { - return "Locking directory: locking %s" + lockPath + return "Locking directory: locking " + lockPath }) dirLock.Close() // #nosec G104 return nil, err diff --git a/src/tmp.go b/src/tmp.go index d3c833e..da96a25 100644 --- a/src/tmp.go +++ b/src/tmp.go @@ -46,7 +46,7 @@ func (ctx *Ctx) NewTmpFile() (*os.File, error) { fd, err := TempFile(jobsPath, "") if err == nil { ctx.LogD("tmp", LEs{{"Src", fd.Name()}}, func(les LEs) string { - return "Temporary file created: %s" + fd.Name() + return "Temporary file created: " + fd.Name() }) } return fd, err