diff options
author | teor <teor@torproject.org> | 2019-08-30 21:15:54 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-08-30 21:51:03 +1000 |
commit | 743bc0028be46e92a46b3b5e38f1e50ee69ff284 (patch) | |
tree | 11ac50c603ad981fd21624c9b939b6eee0f5a11c /src/lib/err | |
parent | e2a7d08aa7c51fa903d5294628612a13b4c0d6e0 (diff) | |
download | tor-743bc0028be46e92a46b3b5e38f1e50ee69ff284.tar.gz tor-743bc0028be46e92a46b3b5e38f1e50ee69ff284.zip |
backtrace: Log the Tor backtrace version whenever we log a backtrace
Previously, we just logged it in the crash handler.
Part of 31571.
Diffstat (limited to 'src/lib/err')
-rw-r--r-- | src/lib/err/backtrace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/err/backtrace.c b/src/lib/err/backtrace.c index 8cca3c37e7..c34eb6dfa6 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 |