mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-23 20:03:31 +01:00
Merge branch 'count-log-bug' into 'main'
also consider LD_BUG logs when counting bug reached Closes #40924 See merge request tpo/core/tor!805
This commit is contained in:
commit
7ba70eeeea
@ -707,6 +707,8 @@ log_fn_(int severity, log_domain_mask_t domain, const char *fn,
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
if (domain & LD_BUG)
|
||||
tor_bug_increment_count_();
|
||||
if (severity > log_global_min_severity_)
|
||||
return;
|
||||
va_start(ap,format);
|
||||
@ -719,6 +721,8 @@ log_fn_ratelim_(ratelim_t *ratelim, int severity, log_domain_mask_t domain,
|
||||
{
|
||||
va_list ap;
|
||||
char *m;
|
||||
if (domain & LD_BUG)
|
||||
tor_bug_increment_count_();
|
||||
if (severity > log_global_min_severity_)
|
||||
return;
|
||||
m = rate_limit_log(ratelim, approx_time());
|
||||
|
@ -41,7 +41,7 @@ logging_metrics_get_stores(void)
|
||||
metrics_store_entry_t *sentry = metrics_store_add(
|
||||
the_store,
|
||||
METRICS_TYPE_COUNTER,
|
||||
METRICS_NAME(bug_reached),
|
||||
METRICS_NAME(bug_reached_count),
|
||||
"Total number of BUG() and similar assertion reached",
|
||||
0, NULL);
|
||||
metrics_store_entry_update(sentry, tor_bug_get_count());
|
||||
|
Loading…
Reference in New Issue
Block a user