Skip to content

Commit bcf48b2

Browse files
Events: Degrade log level to info for network related. (#698)
Why I did it LogAnalyzer in test runs take ERR log messages as failure. Eventd reports some network related issues as error, which could happen due to external network state. How I did it Reduce ERR to INFO. How to verify it Per issue, "config reload" triggers it, Do config-reload and ensure no ERR message from eventd. Issue #12303
1 parent 48cdb3f commit bcf48b2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

common/events.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ EventSubscriber::event_receive(event_receive_op_C_t &op)
418418
rc = event_receive(event_str, op.missed_cnt, op.publish_epoch_ms);
419419
if (rc != 0) {
420420
if (rc != 11) {
421-
SWSS_LOG_ERROR("failed to receive event. rc=%d", rc);
421+
SWSS_LOG_INFO("failed to receive event. rc=%d", rc);
422422
}
423423
goto out;
424424
}
@@ -443,7 +443,7 @@ EventSubscriber::event_receive(event_receive_op_t &op)
443443
rc = event_receive(event_str, op.missed_cnt, op.publish_epoch_ms);
444444
if (rc != 0) {
445445
if (rc != 11) {
446-
SWSS_LOG_ERROR("failed to receive event. rc=%d", rc);
446+
SWSS_LOG_INFO("failed to receive event. rc=%d", rc);
447447
}
448448
goto out;
449449
}
@@ -483,7 +483,7 @@ EventSubscriber::event_receive(string &event_str, uint32_t &missed_cnt,
483483
rc = zmq_message_read(m_socket, 0, evt_source, event_data);
484484
if (rc != 0) {
485485
if (rc != 11) {
486-
SWSS_LOG_ERROR("Failure to read message from sock rc=%d", rc);
486+
SWSS_LOG_INFO("Failure to read message from sock rc=%d", rc);
487487
}
488488
goto out;
489489
}

common/events_common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ using namespace chrono;
4747
#define RET_ON_ERR(res, msg, ...)\
4848
if (!(res)) {\
4949
int _e = errno; \
50-
SWSS_LOG_ERROR(msg, ##__VA_ARGS__); \
51-
SWSS_LOG_ERROR("last:errno=%d", _e); \
50+
SWSS_LOG_INFO(msg, ##__VA_ARGS__); \
51+
SWSS_LOG_INFO("last:errno=%d", _e); \
5252
goto out; }
5353

5454
static const int LINGER_TIMEOUT = 100; /* Linger timeout in milliseconds */
@@ -323,7 +323,7 @@ struct serialization
323323
/* override with zmq err */
324324
rc = zmq_errno();
325325
if (rc != 11) {
326-
SWSS_LOG_ERROR("Failure to read part rc=%d", rc);
326+
SWSS_LOG_INFO("Failure to read part rc=%d", rc);
327327
}
328328
}
329329
out:

0 commit comments

Comments
 (0)