Consumes log messages and saves it to database