A long time ago, I came across this question. In the third answer, that drew my interest, we have the calculation of
$$\int_0^{\pi}\log (\sin \theta)d\theta$$
by taking logarithms in both sides of the trigonometric formula
$$\prod_{k=1}^{n-1}\sin (k\pi/n)=\frac{n}{2^{n-1}}$$
and using Riemann sums. My main concern is the following. How can we use the theory of Riemann sums if the function (here $\theta \mapsto \log (\sin \theta)$) is unbounded in the interval of integration (in our case $[0,\pi]$)? Do you know what's going on at this point of the aforementioned solution?
Thanks in advance for your valuable help!