Log storage operations with debug level #1085

Merged
fyrchik merged 2 commits from fyrchik/frostfs-node:storage-logs into master 2024-04-15 07:57:07 +00:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 245575bee9 - Show all commits

View file

@ -201,6 +201,7 @@ const (
SubscriberCantCastBlockEventValueToBlock = "can't cast block event value to block"
SubscriberCantCastNotifyEventValueToTheNotaryRequestStruct = "can't cast notify event value to the notary request struct"
SubscriberUnsupportedNotificationFromTheChain = "unsupported notification from the chain"
StorageOperation = "local object storage operation"
BlobovniczaCreatingDirectoryForBoltDB = "creating directory for BoltDB"
BlobovniczaOpeningBoltDB = "opening BoltDB"
BlobovniczaInitializing = "initializing..."

View file

@ -1,16 +1,14 @@
package storagelog
import (
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
"go.uber.org/zap"
)
// headMsg is a distinctive part of all messages.
const headMsg = "local object storage operation"
// Write writes message about storage engine's operation to logger.
func Write(logger *logger.Logger, fields ...zap.Field) {
logger.Debug(headMsg, fields...)
logger.Debug(logs.StorageOperation, fields...)
}
// AddressField returns logger's field for object address.