The discussion revolves around the excessive logging of checked_for_custom_avatar entries in Discourse’s staff action logs. watchmanmonitor initially reported 42,525 lines of such logs, which sparked a conversation about the necessity of these logs.
codinghorror agreed that the logging seemed absurd and suggested removing it. Upon further investigation, codinghorror found that these logs were per-user history entries verifying custom avatar lookups.
The logs in question were not under admin/logs but rather in admin/logs/staff_action_logs. watchmanmonitor confirmed that the excessive logs stopped in June 2014, suggesting an old bug.
codinghorror confirmed the issue and found that the logs stopped around May 27, 2014. techAPJ fixed the issue with a pull request. zogstrip explained that the entry was removed in a previous commit and pushed a database migration to remove the useless user history entries.
I checked into this, and this is a per-user history entry that verifies we looked up their avatar.
context "a user who has been checked for a custom avatar" do
before do
UserHistory.create!(action: UserHistory.actions[:checked_for_custom_avatar], target_user_id: user.id )
end
# Finally, we don't check users whose avatars haven't been examined
return unless UserHistory.exists_for_user?(@user, :checked_for_custom_avatar)
Which logs are you referring to? How are you exporting the per-user history logs? These are not under admin/logs AFAIK.
Also do you have 45,525 users? There should only be one of these records per user.
edit: confirmed, we have a zillion of these rows as well in Staff Action Logs. That stopped about 5-27-2014. Looks like some kind of bug in the export process and/or an issue with the number of those records in the individual user histories. @techapj is having a look.