Tameem,

The attached adds more info to those debug-log lines we've been enabling,
it should make grepping and tracking easier.

Andrew
commit 2e67031fd391ffc7fbc278190fe339d48c4bea16
Author: Andrew Cagney <[email protected]>
Date:   Wed Oct 18 11:40:59 2017 -0400

    include the state/connection/state prefix in all debug lines

diff --git a/programs/pluto/log.c b/programs/pluto/log.c
index 9570955..111ab9f 100644
--- a/programs/pluto/log.c
+++ b/programs/pluto/log.c
@@ -462,6 +462,10 @@ void set_debugging(lset_t deb)
 void lswlog_dbg_pre(struct lswlog *buf)
 {
 	lswlogs(buf, DEBUG_PREFIX);
+	add_state_prefix(buf);
+	if (cur_state != NULL) {
+		lswlogf(buf, "%s: ", enum_short_name(&state_names, cur_state->st_state));
+	}
 }
 
 void lswlog_dbg_raw(struct lswlog *buf)
diff --git a/programs/pluto/pluto_constants.c b/programs/pluto/pluto_constants.c
index 36803a4..72ac810 100644
--- a/programs/pluto/pluto_constants.c
+++ b/programs/pluto/pluto_constants.c
@@ -207,7 +207,7 @@ static const char *const state_name[] = {
 enum_names state_names = {
 	STATE_UNDEFINED, STATE_IKEv2_ROOF,
 	ARRAY_REF(state_name),
-	NULL, /* prefix */
+	"STATE_", /* prefix */
 	NULL
 };
 
_______________________________________________
Swan-dev mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-dev

Reply via email to