Logarithmic corrections to twisted indices from the quantum entropy function