Skip to content

Commit

Permalink
WHISTLE-1023: added helpful logging for failover finding
Browse files Browse the repository at this point in the history
  • Loading branch information
James Aimonetti committed Mar 20, 2012
1 parent 3c0a073 commit c7c82bd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions whistle_apps/apps/trunkstore/src/ts_from_offnet.erl
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,12 @@ routing_data(ToDID, AcctID) ->
Num = wnm_util:normalize_number(ToDID),
Db = wnm_util:number_to_db_name(Num),
FL = case couch_mgr:open_doc(Db, Num) of
{ok, NumJObj} -> [wh_json:get_value(<<"failover">>, NumJObj) | FailoverLocations];
{error, _} -> FailoverLocations
{ok, NumJObj} ->
?LOG("found ~s in ~s", [Num, Db]),
[wh_json:get_value(<<"failover">>, NumJObj) | FailoverLocations];
{error, _} ->
?LOG("failed to find ~s in ~s", [Num, Db]),
FailoverLocations
end,

Failover = ts_util:failover(FL),
Expand Down

0 comments on commit c7c82bd

Please sign in to comment.