Fixed logging import database connection