8. Let the function be
$$
\begin{array}{l}
f(x)=\frac{1}{2}+\ln \frac{x}{1-x}\left(n \geqslant 2, \text { and } n \in \mathbf{N}_{+}\right) . \\
\text {Then } \sum_{i=1}^{n-1} f\left(\frac{i}{n}\right)=
\end{array}
$$
8. $\frac{n-1}{2}$.

Obviously, the domain of $f(x)$ is $(0,1)$, and
$$
f(x)+f(1-x)=1 \text {. }
$$

Then $2 \sum_{i=1}^{n-1} f\left(\frac{i}{n}\right)=\sum_{i=1}^{n-1}\left(f\left(\frac{i}{n}\right)+f\left(\frac{n-i}{n}\right)\right)$ $=n-1$.
Therefore, $\sum_{i=1}^{n-1} f\left(\frac{i}{n}\right)=\frac{n-1}{2}$.