]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add "Heartbeat" to the start of several heartbeat messages.
authorNick Mathewson <nickm@torproject.org>
Fri, 19 Mar 2021 17:33:56 +0000 (13:33 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 19 Mar 2021 17:33:56 +0000 (13:33 -0400)
Closes #40322.

changes/ticket40322 [new file with mode: 0644]
src/core/or/dos.c
src/core/or/status.c
src/test/test_status.c

diff --git a/changes/ticket40322 b/changes/ticket40322
new file mode 100644 (file)
index 0000000..18a65b3
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor features (logging):
+    - Edit heartbeat log messages so that more of them begin with the string
+      "Heartbeat: ".  Closes ticket 40322; patch from 'cypherpunks'.
index a5ea53bb3efe3637a329f26b84e59d6995bf1b04..e8652c901e3af097fa3467c2ed5befe885e24b6b 100644 (file)
@@ -819,7 +819,8 @@ dos_log_heartbeat(void)
 
   char *msg = smartlist_join_strings(elems, ", ", 0, NULL);
 
-  log_notice(LD_HEARTBEAT, "DoS mitigation since startup: %s.", msg);
+  log_notice(LD_HEARTBEAT,
+             "Heartbeat: DoS mitigation since startup: %s.", msg);
 
   tor_free(msg);
   SMARTLIST_FOREACH(elems, char *, e, tor_free(e));
index df9577ada558918344301e3c6088d1c58419ce27..9e7ae70535cded496fb163a21da964314effc920 100644 (file)
@@ -105,7 +105,7 @@ log_onion_service_stats(void)
   }
 
   log_notice(LD_HEARTBEAT,
-             "Our onion service%s received %u v3 INTRODUCE2 cells "
+             "Heartbeat: Our onion service%s received %u v3 INTRODUCE2 cells "
              "and attempted to launch %d rendezvous circuits.",
              num_services == 1 ? "" : "s",
              hs_stats_get_n_introduce2_v3_cells(),
index 284a6b7eaf6ebc79c70a0330c93ec4435886f4d8..1d371645aecb0385f9d60430d6446117ab29a584 100644 (file)
@@ -359,8 +359,8 @@ test_status_hb_not_in_consensus(void *arg)
                  "initiated 0 and received 0 v3 connections; "
                  "initiated 0 and received 0 v4 connections; "
                  "initiated 0 and received 0 v5 connections.\n");
-  expect_log_msg("DoS mitigation since startup: 0 circuits killed with "
-                 "too many cells, [DoSCircuitCreationEnabled disabled], "
+  expect_log_msg("Heartbeat: DoS mitigation since startup: 0 circuits killed "
+                 "with too many cells, [DoSCircuitCreationEnabled disabled], "
                  "[DoSConnectionEnabled disabled], "
                  "[DoSRefuseSingleHopClientRendezvous disabled], "
                  "0 INTRODUCE2 rejected.\n");