Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(logging)_: default waku node logs to INFO level #6164

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
UPDATE log_config
SET
log_namespaces = 'wakunode:info'
WHERE
log_namespaces IS NULL
OR log_namespaces = '';
2 changes: 1 addition & 1 deletion wakuv2/message_publishing.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (w *Waku) publishEnvelope(envelope *protocol.Envelope) {
var err error
// only used in testing to simulate going offline
if w.cfg.SkipPublishToTopic {
logger.Info("skipping publish to topic")
logger.Debug("skipping publish to topic")
err = errors.New("test send failure")
} else {
err = w.messageSender.Send(publish.NewRequest(w.ctx, envelope))
Expand Down
8 changes: 4 additions & 4 deletions wakuv2/waku.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func New(nodeKey *ecdsa.PrivateKey, fleet string, cfg *Config, logger *zap.Logge
node.WithConnectionNotification(waku.connectionNotifChan),
node.WithTopicHealthStatusChannel(waku.topicHealthStatusChan),
node.WithKeepAlive(randomPeersKeepAliveInterval, allPeersKeepAliveInterval),
node.WithLogger(logger),
node.WithLogger(logger.Named("wakunode")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to refer to namespaces we need to hardcode using constants.

node.WithLogLevel(logger.Level()),
node.WithClusterID(cfg.ClusterID),
node.WithMaxMsgSize(1024 * 1024),
Expand Down Expand Up @@ -609,7 +609,7 @@ func (w *Waku) runPeerExchangeLoop() {
w.logger.Debug("Peer exchange loop stopped")
return
case <-ticker.C:
w.logger.Info("Running peer exchange loop")
w.logger.Debug("Running peer exchange loop")

// We select only the nodes discovered via DNS Discovery that support peer exchange
// We assume that those peers are running peer exchange according to infra config,
Expand Down Expand Up @@ -1021,7 +1021,7 @@ func (w *Waku) GetFilter(id string) *common.Filter {
// Unsubscribe removes an installed message handler.
func (w *Waku) UnsubscribeMany(ids []string) error {
for _, id := range ids {
w.logger.Info("cleaning up filter", zap.String("id", id))
w.logger.Debug("cleaning up filter", zap.String("id", id))
ok := w.filters.Uninstall(id)
if !ok {
w.logger.Warn("could not remove filter with id", zap.String("id", id))
Expand Down Expand Up @@ -1445,7 +1445,7 @@ func (w *Waku) OnNewEnvelopes(envelope *protocol.Envelope, msgType common.Messag

_, err := w.add(recvMessage, processImmediately)
if err != nil {
logger.Info("invalid envelope received", zap.Error(err))
logger.Debug("invalid envelope received", zap.Error(err))
trouble = true
}

Expand Down
Loading