How to make barnyard2 auto log to database?