treewide: Make logging variables more consistent
This aims to better group related variables and differentiate keywords
like INTERFACE_NAME into NET vs DBUS.
Tested: Ran on a machine to verify that our info log messages still look
sane in the journal.
Change-Id: Ic4d1faaaf5c432e69cacd387fa972481916b6bc8
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager.cpp b/src/network_manager.cpp
index 72e0d03..85133c7 100644
--- a/src/network_manager.cpp
+++ b/src/network_manager.cpp
@@ -186,7 +186,7 @@
}
if (!info.intf.name)
{
- lg2::error("Can't create interface without name: {IFIDX}", "IFIDX",
+ lg2::error("Can't create interface without name: {NET_IDX}", "NET_IDX",
info.intf.idx);
return;
}
@@ -216,8 +216,8 @@
if (!ignored.contains(*info.name))
{
ignored.emplace(*info.name);
- lg2::info("Ignoring interface {INTERFACE_NAME}",
- "INTERFACE_NAME", *info.name);
+ lg2::info("Ignoring interface {NET_INTF}", "NET_INTF",
+ *info.name);
}
ignoredIntf.emplace(info.idx);
return;
@@ -399,7 +399,7 @@
}
else if (!ignoredIntf.contains(ifidx))
{
- lg2::error("Interface {IFIDX} not found for gw", "IFIDX", ifidx);
+ lg2::error("Interface {NET_IDX} not found for gw", "NET_IDX", ifidx);
}
}
@@ -461,7 +461,7 @@
{
if (id == 0 || id >= 4095)
{
- lg2::error("VLAN ID {VLAN_ID} is not valid", "VLAN_ID", id);
+ lg2::error("VLAN ID {NET_VLAN} is not valid", "NET_VLAN", id);
elog<InvalidArgument>(
Argument::ARGUMENT_NAME("VLANId"),
Argument::ARGUMENT_VALUE(std::to_string(id).c_str()));