Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
Drop logging level for "no record of user %s"
Browse files Browse the repository at this point in the history
This warning is tripped primarily when an admin is defined in local.ini
and has no associated _users document. This can happen fairly often in
development and testing setups, meaning that every other line in the
logfile is "no record of user admin".

The right thing to do here might be to check if the currently defined
user is a local admin and only complain in that situation, but presently
chttpd only directly depends on couch_auth_cache and to do so would 
require unencapsulating how couch_auth_cache handles ini file defined
admin users vs. authentication database users, which feels wrong.

Change suggested by @janl in #couchdb-dev IRC.
  • Loading branch information
wohali committed Sep 2, 2016
1 parent 35cb938 commit e01cc40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chttpd_auth_cache.erl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ load_user_from_db(UserName) ->
{Props} = couch_doc:to_json_obj(Doc, []),
Props;
_Else ->
couch_log:warning("no record of user ~s", [UserName]),
couch_log:debug("no record of user ~s", [UserName]),
nil
catch error:database_does_not_exist ->
nil
Expand Down

0 comments on commit e01cc40

Please sign in to comment.