From 215f4343022f441fa5b1e83042b256444cd84be0 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Fri, 19 Apr 2024 19:33:15 -0700 Subject: [PATCH] suppress non-critical messages logging --- go/vt/discovery/keyspace_events.go | 8 ++++---- go/vt/logutil/vts_logger.go | 2 +- go/vt/vtgate/buffer/shard_buffer.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go/vt/discovery/keyspace_events.go b/go/vt/discovery/keyspace_events.go index 0b3fa7e9efe..41e3652478f 100644 --- a/go/vt/discovery/keyspace_events.go +++ b/go/vt/discovery/keyspace_events.go @@ -269,10 +269,10 @@ func (kss *keyspaceState) ensureConsistentLocked() { Serving: sstate.serving, }) - log.Infof("keyspace event resolved: %s/%s is now consistent (serving: %v)", - sstate.target.Keyspace, sstate.target.Keyspace, - sstate.serving, - ) + //log.Infof("keyspace event resolved: %s/%s is now consistent (serving: %v)", + // sstate.target.Keyspace, sstate.target.Keyspace, + // sstate.serving, + //) if !sstate.serving { delete(kss.shards, shard) diff --git a/go/vt/logutil/vts_logger.go b/go/vt/logutil/vts_logger.go index da890aaee24..4a582234827 100644 --- a/go/vt/logutil/vts_logger.go +++ b/go/vt/logutil/vts_logger.go @@ -32,7 +32,7 @@ func SetVTStructureLogger(conf *zap.Config) (vtSLogger *zap.SugaredLogger, err e // Use the passed configuration instead of the default configuration if conf == nil { defaultProdConf := zap.NewProductionConfig() - defaultProdConf.Level.SetLevel(zap.WarnLevel) + //defaultProdConf.Level.SetLevel(zap.WarnLevel) conf = &defaultProdConf } diff --git a/go/vt/vtgate/buffer/shard_buffer.go b/go/vt/vtgate/buffer/shard_buffer.go index b1f8c4538ec..6695dc3f30e 100644 --- a/go/vt/vtgate/buffer/shard_buffer.go +++ b/go/vt/vtgate/buffer/shard_buffer.go @@ -480,7 +480,7 @@ func (sb *shardBuffer) recordKeyspaceEvent(alias *topodatapb.TabletAlias, stillS sb.mu.Lock() defer sb.mu.Unlock() - log.Infof("disruption in shard %s/%s resolved (serving: %v)", sb.keyspace, sb.shard, stillServing) + //log.Infof("disruption in shard %s/%s resolved (serving: %v)", sb.keyspace, sb.shard, stillServing) if !topoproto.TabletAliasEqual(alias, sb.currentPrimary) { if sb.currentPrimary != nil {