[CRIU] [PATCH 13/15] net: Add prefixes for better logging

Cyrill Gorcunov gorcunov at gmail.com
Thu Sep 13 22:57:56 MSK 2018


Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 criu/sk-inet.c    | 3 +++
 criu/sk-netlink.c | 3 +++
 criu/sk-packet.c  | 3 +++
 criu/sk-queue.c   | 3 +++
 criu/sk-tcp.c     | 2 ++
 criu/sockets.c    | 3 +++
 6 files changed, 17 insertions(+)

diff --git a/criu/sk-inet.c b/criu/sk-inet.c
index 7f5ea5324dc2..d9fb06b1eab7 100644
--- a/criu/sk-inet.c
+++ b/criu/sk-inet.c
@@ -30,6 +30,9 @@
 #include "util.h"
 #include "namespaces.h"
 
+#undef  LOG_PREFIX
+#define LOG_PREFIX "inet: "
+
 #define PB_ALEN_INET	1
 #define PB_ALEN_INET6	4
 
diff --git a/criu/sk-netlink.c b/criu/sk-netlink.c
index f26c4dec0cdb..e4163f53800a 100644
--- a/criu/sk-netlink.c
+++ b/criu/sk-netlink.c
@@ -14,6 +14,9 @@
 #include "libnetlink.h"
 #include "namespaces.h"
 
+#undef  LOG_PREFIX
+#define LOG_PREFIX "netlink: "
+
 struct netlink_sk_desc {
 	struct socket_desc	sd;
 	u32			portid;
diff --git a/criu/sk-packet.c b/criu/sk-packet.c
index 796aa6e83f07..0abe84071e16 100644
--- a/criu/sk-packet.c
+++ b/criu/sk-packet.c
@@ -22,6 +22,9 @@
 #include "images/fdinfo.pb-c.h"
 #include "namespaces.h"
 
+#undef  LOG_PREFIX
+#define LOG_PREFIX "packet: "
+
 struct packet_sock_info {
 	PacketSockEntry *pse;
 	struct file_desc d;
diff --git a/criu/sk-queue.c b/criu/sk-queue.c
index 4ce8ccf45ec5..d19de7504269 100644
--- a/criu/sk-queue.c
+++ b/criu/sk-queue.c
@@ -24,6 +24,9 @@
 #include "protobuf.h"
 #include "images/sk-packet.pb-c.h"
 
+#undef  LOG_PREFIX
+#define LOG_PREFIX "skqueue: "
+
 struct sk_packet {
 	struct list_head	list;
 	SkPacketEntry		*entry;
diff --git a/criu/sk-tcp.c b/criu/sk-tcp.c
index 353125f2b7a7..4fd2eb8e6077 100644
--- a/criu/sk-tcp.c
+++ b/criu/sk-tcp.c
@@ -27,6 +27,8 @@
 #include "protobuf.h"
 #include "images/tcp-stream.pb-c.h"
 
+#undef  LOG_PREFIX
+#define LOG_PREFIX "tcp: "
 
 static LIST_HEAD(cpt_tcp_repair_sockets);
 static LIST_HEAD(rst_tcp_repair_sockets);
diff --git a/criu/sockets.c b/criu/sockets.c
index fecca1a2f96c..cb19dcc87131 100644
--- a/criu/sockets.c
+++ b/criu/sockets.c
@@ -29,6 +29,9 @@
 #include "util.h"
 #include "fdstore.h"
 
+#undef  LOG_PREFIX
+#define LOG_PREFIX "sockets: "
+
 #ifndef SOCK_DIAG_BY_FAMILY
 #define SOCK_DIAG_BY_FAMILY 20
 #endif
-- 
2.17.1



More information about the CRIU mailing list