mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 19:42:11 +02:00
Get stacktrace out of lager context
Calling erlang:get_stacktrace() inside lager functions produces stacktraces of the logging function itself, not the function which has failed.
This commit is contained in:
parent
b416527e4f
commit
88d0b71d58
11 changed files with 39 additions and 22 deletions
|
@ -122,10 +122,11 @@ row_to_route(Domain, {ServerHost, NodeS, PidS, LocalHintS} = Row) ->
|
|||
catch _:{bad_node, _} ->
|
||||
[];
|
||||
E:R ->
|
||||
St = erlang:get_stacktrace(),
|
||||
?ERROR_MSG("failed to decode row from 'route' table:~n"
|
||||
"Row = ~p~n"
|
||||
"Domain = ~s~n"
|
||||
"Reason = ~p",
|
||||
[Row, Domain, {E, {R, erlang:get_stacktrace()}}]),
|
||||
[Row, Domain, {E, {R, St}}]),
|
||||
[]
|
||||
end.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue