diff options
Diffstat (limited to 'src/chttpd/src/chttpd_stats.erl')
-rw-r--r-- | src/chttpd/src/chttpd_stats.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/chttpd/src/chttpd_stats.erl b/src/chttpd/src/chttpd_stats.erl index ae1efa486..18622783c 100644 --- a/src/chttpd/src/chttpd_stats.erl +++ b/src/chttpd/src/chttpd_stats.erl @@ -12,8 +12,7 @@ -module(chttpd_stats). -% for the stacktrace macro only so far --include_lib("couch/include/couch_db.hrl"). +-include_lib("kernel/include/logger.hrl"). -export([ init/1, @@ -63,13 +62,19 @@ report(HttpResp) -> _ -> ok end - catch ?STACKTRACE(T, R, S) + catch T:R:S -> + ?LOG_ERROR(#{ + what => stats_report_failure, + tag => T, + details => R, + stacktrace => S + }), Fmt = "Failed to report chttpd request stats: ~p:~p ~p", couch_log:error(Fmt, [T, R, S]) end. -report(HttpResp, #st{reporter = undefined}) -> +report(_HttpResp, #st{reporter = undefined}) -> ok; report(HttpResp, #st{reporter = Reporter} = St) -> |