Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.3] prompt log readability change #6658

Merged
merged 1 commit into from
Nov 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions core/kazoo_media/src/kz_media_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ get_prompt(PromptId, Lang, AccountId, 'true') ->
lager:debug("media ~s is not a prompt, leaving alone", [PromptId]),
PromptId;
'false' ->
lager:debug("using account override for ~s in account ~s", [PromptId, AccountId]),
lager:debug("trying to lookup override for prompt ~s in account ~s", [PromptId, AccountId]),
maybe_prompt_path(PromptId
,Lang
,AccountId
Expand All @@ -519,9 +519,10 @@ get_prompt(PromptId, Lang, _AccountId, 'false') ->
-spec maybe_prompt_path(kz_term:ne_binary(), kz_term:api_ne_binary(), kz_term:api_ne_binary(), {'ok', kz_json:object()} | kz_datamgr:data_error()) ->
kz_term:api_ne_binary().
maybe_prompt_path(PromptId, Lang, AccountId, {'error', _}=Err) ->
lager:debug("building default prompt path. Error looking up for prompt ~s: ~p", [PromptId, Err]),
lager:debug("building system prompt path, account ~s does not have custom prompt ~s: ~p ", [AccountId, PromptId, Err]),
kz_binary:join([<<"prompt:/">>, AccountId, PromptId, Lang], <<"/">>);
maybe_prompt_path(PromptId, _Lang, AccountId, {'ok', _}) ->
lager:debug("using account override for prompt ~s in account ~s ", [PromptId, AccountId]),
prompt_path(AccountId, PromptId).

-spec is_not_prompt(kz_term:api_binary()) -> boolean().
Expand Down