removed some debug in database, added a set_formatter in the logger