mirror of
https://github.com/rclone/rclone.git
synced 2026-10-09 06:28:15 -04:00
box, serve s3: fix log messages with bad format strings
The box backend logged an int64 with %q which printed
%!q(int64=123) instead of the sequence ID.
serve s3 passed the message from gofakes3 as the format string, so
any % in it was interpreted as a formatting directive and the message
was mangled.
(cherry picked from commit 1c3e432c3f)
This commit is contained in:
1 parent
5bc26e57b4
commit
34ad19a1eb
2 files changed
+4
-4
No files matched your search
+1
-1
@@ -1461,7 +1461,7 @@ func (f *Fs) changeNotifyRunner(ctx context.Context, notifyFunc func(string, fs.
|
||||
// Item in the cache has the same or newer SequenceID than
|
||||
// this event. Ignore this event, it must be old.
|
||||
f.itemMetaCacheMu.Unlock()
|
||||
fs.Debugf(f, "%s ignored due to old SequenceID (%q)", eventDetails, itemMeta.SequenceID)
|
||||
fs.Debugf(f, "%s ignored due to old SequenceID (%d)", eventDetails, itemMeta.SequenceID)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ func (l logger) Print(level gofakes3.LogLevel, v ...any) {
|
||||
default:
|
||||
fallthrough
|
||||
case gofakes3.LogErr:
|
||||
fs.Errorf("serve s3", s)
|
||||
fs.Errorf("serve s3", "%s", s)
|
||||
case gofakes3.LogWarn:
|
||||
fs.Infof("serve s3", s)
|
||||
fs.Infof("serve s3", "%s", s)
|
||||
case gofakes3.LogInfo:
|
||||
fs.Debugf("serve s3", s)
|
||||
fs.Debugf("serve s3", "%s", s)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user