Skip to content

Commit

Permalink
NetworkNamespaceContext: Changed logging to TRACE level to generate l…
Browse files Browse the repository at this point in the history
…ess noise by default.
  • Loading branch information
levy committed Mar 20, 2024
1 parent db3481e commit 40c1190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inet/common/NetworkNamespaceContext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ NetworkNamespaceContext::NetworkNamespaceContext(const char *name)
throw cRuntimeError("Cannot open network namespace: %s, errno=%d (%s)", name, errno, strerror(errno));
global = true;
}
EV_INFO << "Switching to network namespace" << EV_FIELD(name) << EV_FIELD(newFd) << std::endl;
EV_TRACE << "Switching to network namespace" << EV_FIELD(name) << EV_FIELD(newFd) << std::endl;
if (setns(newFd, 0) != 0)
throw cRuntimeError("Cannot switch to network namespace: %s, errno=%d (%s)", name, errno, strerror(errno));
#else
Expand All @@ -108,7 +108,7 @@ NetworkNamespaceContext::~NetworkNamespaceContext()
{
if (newFd != -1) {
#ifdef __linux__
EV_INFO << "Switching back to network namespace" << EV_FIELD(name) << EV_FIELD(oldFd) << std::endl;
EV_TRACE << "Switching back to network namespace" << EV_FIELD(name) << EV_FIELD(oldFd) << std::endl;
if (setns(oldFd, 0) != 0)
EV_FATAL << "Cannot switch to network namespace: " << name << ", errno=" << errno << " (" << strerror(errno) << ")" << EV_ENDL;
if (global) {
Expand Down

0 comments on commit 40c1190

Please sign in to comment.