hnbgw: Introduce LOGHNB() macro for log context information

So far we don't really have any way of matching a given log message
to a specific hNB.  Let's introduce a new log macro, together with
a configuration directive to select whether the hNB-ID or the
UMTS CellID shall be used.

Change-Id: I6113925216c6f88add2c6d27bdf47ccbb017f293
diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c
index f2e51d4..a826246 100644
--- a/src/hnbgw_vty.c
+++ b/src/hnbgw_vty.c
@@ -296,6 +296,19 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_hnbgw_log_prefix, cfg_hnbgw_log_prefix_cmd,
+      "log-prefix (hnb-id|umts-cell-id)",
+      "Configure the log message prefix\n"
+      "Use the hNB-ID as log message prefix\n"
+      "Use the UMTS Cell ID as log message prefix\n")
+{
+	if (!strcmp(argv[0], "hnb-id"))
+		g_hnb_gw->config.log_prefix_hnb_id = true;
+	else
+		g_hnb_gw->config.log_prefix_hnb_id = false;
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_hnbgw_iucs_remote_addr,
       cfg_hnbgw_iucs_remote_addr_cmd,
       "remote-addr NAME",
@@ -319,6 +332,8 @@
 static int config_write_hnbgw(struct vty *vty)
 {
 	vty_out(vty, "hnbgw%s", VTY_NEWLINE);
+	vty_out(vty, " log-prefix %s%s", g_hnb_gw->config.log_prefix_hnb_id ? "hnb-id" : "umts-cell-id",
+		VTY_NEWLINE);
 	return CMD_SUCCESS;
 }
 
@@ -376,6 +391,7 @@
 	install_node(&hnbgw_node, config_write_hnbgw);
 
 	install_element(HNBGW_NODE, &cfg_hnbgw_rnc_id_cmd);
+	install_element(HNBGW_NODE, &cfg_hnbgw_log_prefix_cmd);
 
 	install_element(HNBGW_NODE, &cfg_hnbgw_iuh_cmd);
 	install_node(&iuh_node, config_write_hnbgw_iuh);