Skip to content

Commit

Permalink
[teamsyncd]: Add INFO logs before adding/removing LAGs
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuotian Cheng committed Apr 13, 2017
1 parent 807318d commit a89c4a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions teamsyncd/teamsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ void TeamSync::addLag(const string &lagName, int ifindex, bool admin_state,
fvVector.push_back(m);
m_lagTable.set(lagName, fvVector);

SWSS_LOG_INFO("Add %s admin_status:%s oper_status:%s mtu:%d",
lagName.c_str(), admin_state ? "up" : "down", oper_state ? "up" : "down", mtu);

/* Return when the team instance has already been tracked */
if (m_teamPorts.find(lagName) != m_teamPorts.end())
return;
Expand All @@ -75,6 +78,8 @@ void TeamSync::removeLag(const string &lagName)
/* Delete the LAG */
m_lagTable.del(lagName);

SWSS_LOG_INFO("Remove %s", lagName.c_str());

/* Return when the team instance hasn't been tracked before */
if (m_teamPorts.find(lagName) == m_teamPorts.end())
return;
Expand Down

0 comments on commit a89c4a2

Please sign in to comment.