add logging to database.py
add log file to .gitignore