chiark / gitweb /
networkd: improve logging a bit
authorTom Gundersen <teg@jklm.no>
Sun, 12 Jan 2014 14:24:11 +0000 (15:24 +0100)
committerTom Gundersen <teg@jklm.no>
Sun, 12 Jan 2014 14:37:21 +0000 (15:37 +0100)
src/network/networkd-bridge.c
src/network/networkd-link.c

index fa87d3e..430b5c5 100644 (file)
@@ -108,6 +108,8 @@ static int bridge_join_ready(Bridge *bridge, Link* link, sd_rtnl_message_handler
                 return r;
         }
 
+        log_debug_bridge(bridge, "joining link %s to bridge", link->ifname);
+
         return 0;
 }
 
index 52b023c..25d92c8 100644 (file)
@@ -453,6 +453,8 @@ static int link_acquire_conf(Link *link) {
                         return r;
         }
 
+        log_debug_link(link, "acquiring DHCPv4 lease");
+
         r = sd_dhcp_client_start(link->dhcp);
         if (r < 0)
                 return r;
@@ -470,7 +472,7 @@ static int link_update_flags(Link *link, unsigned flags) {
                 return 0;
 
         if (link->flags == flags) {
-                log_debug_link(link, "link status unchanged: %#x", flags);
+                log_debug_link(link, "link status unchanged: %#.8x", flags);
                 return 0;
         }
 
@@ -503,7 +505,7 @@ static int link_update_flags(Link *link, unsigned flags) {
         }
 
         log_debug_link(link,
-                       "link status updated: %#x -> %#x", link->flags, flags);
+                       "link status updated: %#.8x -> %#.8x", link->flags, flags);
 
         link->flags = flags;
 
@@ -609,6 +611,7 @@ static int bridge_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
                         link->network->bridge->name,
                         BRIDGE(link->network->bridge),
                         NULL);
+
         link_bridge_joined(link);
 
         return 1;