better mysql logging