[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.5] backtrace: Log the Tor backtrace version whenever we log a backtrace



commit 743bc0028be46e92a46b3b5e38f1e50ee69ff284
Author: teor <teor@xxxxxxxxxxxxxx>
Date:   Fri Aug 30 21:15:54 2019 +1000

    backtrace: Log the Tor backtrace version whenever we log a backtrace
    
    Previously, we just logged it in the crash handler.
    
    Part of 31571.
---
 src/lib/err/backtrace.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/err/backtrace.c b/src/lib/err/backtrace.c
index 8cca3c37e..c34eb6dfa 100644
--- a/src/lib/err/backtrace.c
+++ b/src/lib/err/backtrace.c
@@ -127,7 +127,7 @@ log_backtrace_impl(int severity, int domain, const char *msg,
   depth = backtrace(cb_buf, MAX_DEPTH);
   symbols = backtrace_symbols(cb_buf, (int)depth);
 
-  logger(severity, domain, "%s. Stack trace:", msg);
+  logger(severity, domain, "%s: %s. Stack trace:", bt_version, msg);
   if (!symbols) {
     /* LCOV_EXCL_START -- we can't provoke this. */
     logger(severity, domain, "    Unable to generate backtrace.");
@@ -240,7 +240,8 @@ void
 log_backtrace_impl(int severity, int domain, const char *msg,
                    tor_log_fn logger)
 {
-  logger(severity, domain, "%s. (Stack trace not available)", msg);
+  logger(severity, domain, "%s: %s. (Stack trace not available)",
+         bt_version, msg);
 }
 
 static int



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits