Replace legacy clog with query logging api