Skip to content

Commit

Permalink
Making my lager messages lower case to appese the code overlords
Browse files Browse the repository at this point in the history
  • Loading branch information
tickbw committed Aug 8, 2013
1 parent 8fd1c37 commit 5152c61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions applications/cdr/src/cdr_v3_migrate_lib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ generate_test_account({AccountName, AccountRealm, User, Pass}, NumMonths, NumCdr
generate_test_account_cdrs(AccountDb, CdrJObjFixture, Date, NumCdrs)
end, DateRange);
{'multiples', AccountDbs} ->
lager:debug("Found multiple DBS for Account Name: ~p", [AccountDbs]),
lager:debug("found multiple DBS for Account Name: ~p", [AccountDbs]),
{'error', 'multiple_account_dbs'};
{'error', Reason} ->
lager:debug("Failed to find account: ~p [~s]", [Reason, AccountName]),
lager:debug("failed to find account: ~p [~s]", [Reason, AccountName]),
{'error', Reason}
end.

Expand Down Expand Up @@ -131,7 +131,7 @@ generate_test_account_cdrs(AccountDb, CdrJObjFixture, Date, NumCdrs) ->
],
Doc = wh_json:set_values(Props, CdrJObjFixture),
case couch_mgr:save_doc(AccountDb, Doc) of
{'error',_}=_E -> lager:debug("CDR Save Failed: ~p", [_E]);
{'error',_}=_E -> lager:debug("cdr Save Failed: ~p", [_E]);
{'ok', _} -> 'ok'
end,
generate_test_account_cdrs(AccountDb, CdrJObjFixture, Date, NumCdrs - 1).
Expand Down Expand Up @@ -161,14 +161,14 @@ maybe_get_migrate_account(AccountDb) ->
matches_realm(<<"migratetest", _:3/binary, ".realm.com">>) -> 'true';
matches_realm(<<"v3migratetest", _:3/binary, ".realm.com">>) -> 'true';
matches_realm(Realm) ->
lager:debug("Realm does not match migrate pattern: ~p", [Realm]),
lager:debug("realm does not match migrate pattern: ~p", [Realm]),
'false'.

-spec maybe_delete_test_account(account_db()) -> 'ok' | {'error', any()}.
maybe_delete_test_account(AccountDb) ->
case maybe_get_migrate_account(AccountDb) of
'false' -> 'ok';
[] -> lager:debug("AccountDb is not a migrate test: ~p", [AccountDb]);
[] -> lager:debug("account_db is not a migrate test: ~p", [AccountDb]);
[_Account] ->
NumMonthsToShard = whapps_config:get_integer(?CONFIG_CAT, <<"v3_migrate_num_months">>, 4),
AccountId = wh_util:format_account_id(AccountDb, 'raw'),
Expand Down
2 changes: 1 addition & 1 deletion applications/cdr/src/cdr_v3_migrate_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ handle_cast('start_next_worker', #state{account_list=[NextAccount|RestAccounts]
]),
{'noreply', State#state{account_list=RestAccounts, pid=NewPid, ref=NewRef}};
handle_cast(_Msg, State) ->
lager:debug("unhandled call to handle_cast executed, ~p", [_Msg]),
lager:debug("unhandled handle_cast ~p", [_Msg]),
{'noreply', State}.

%%--------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion applications/cdr/src/cdr_v3_migrate_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ soft_delete_cdrs(AccountDb, JObjs) ->
{'error', _E} ->
lager:error("cdr_migrator: error soft deleting");
{'ok', _} ->
lager:info("cdr_migrator: soft deleted batch of docs")
lager:debug("cdr_migrator: soft deleted batch of docs")
end.

-spec migrate_cdrs_for_date(account_id(), account_db(), wh_date()) -> any().
Expand Down

0 comments on commit 5152c61

Please sign in to comment.