log to db(info, debug, warning, error)