In Sec. 2.4 of Inside Interesting Integrals (2015), Paul J Nahin says of $$I:=\int_0^{\pi/2}\ln (a\sin x)dx=\int_0^{\pi/2}\ln (a\cos x)dx$$that:
For many years it was commonly claimed in textbooks that these are quite difficult integrals to do, best tackled with the powerful techniques of contour integration. As you’ll see with the following analysis, however, that is simply not the case.
The real method is$$2I=\int_0^{\pi/2}\ln\left(\frac{a^2}{2}\sin 2x\right)dx=\frac{\pi}{2}\ln\frac{a}{2}+\frac{1}{2}\int_0^\pi\ln(a\sin y) dy=\frac{\pi}{2}\ln\frac{a}{2}+I,$$so $I=\frac{\pi}{2}\ln\frac{a}{2}$. Presumably Euler's calculation, which Nahin says he did for $a=1$ in 1769, didn't use the above method, or else textbooks would never have claimed the need for contour integration. So when did the above proof first surface? And when did textbooks first claim the need for complex methods?