kvdb/bolt_compact: filter out non-ASCII from bucket name before printing

Printing the raw bucket name lead to weird characters and even sounds
being printed.
This commit is contained in:
Johan T. Halseth 2021-10-21 22:54:48 +02:00
parent 10aaa35db5
commit 6be6585643
No known key found for this signature in database
GPG key ID: 15BAADA29DA20D26

View file

@ -220,7 +220,8 @@ func (cmd *compacter) walk(db *bbolt.DB, walkFn walkFunc) error {
return tx.ForEach(func(name []byte, b *bbolt.Bucket) error {
// This will log the top level buckets only to give the
// user some sense of progress.
log.Debugf("Compacting top level bucket %s", name)
log.Debugf("Compacting top level bucket '%s'",
LoggableKeyName(name))
return cmd.walkBucket(
b, nil, name, nil, b.Sequence(), walkFn,