<s>[INST] Computing $\int_{0}^{\pi} \ln (\sin x+2) d x$ and $\int_{0}^{\pi} \ln (2-\sin x) d x$ I first encountered this integral
$$
I=\int_{0}^{\pi} \ln (\sin x+2) d x
$$
several months ago without any idea and had tried many methods such as integration by parts, substitution and Fourier series etc. but all are in vain. Today, I tried the tangent substitution and succeeded.  Now I want to share with you and seek any other alternatives.
For simplicity, I convert, by symmetry, the integral into
$$
I=2 \int_{0}^{\frac{\pi}{2}} \ln (\sin 2 x+2) d x
$$
and substitute $t=\tan x$, and get
$$
\begin{aligned}
I &=2 \int_{0}^{\frac{\pi}{2}} \ln (\sin 2 x+2) d x \\
&=2 \int_{0}^{\infty} \ln \left(\frac{2 t}{1+t^{2}}+2\right) \frac{d t}{1+t^{2}} \\
&=2 \int_{0}^{\infty} \frac{\ln 2+\ln \left(t^{2}+t+1\right)-\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\
&=\pi \ln 2+2 \int_{0}^{\infty} \frac{\ln \left(t^{2}+t+1\right)}{1+t^{2}}-2 \int_{0}^{\infty} \frac{\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\
&=\pi \ln 2+2  \underbrace{  \left[\frac{\pi}{3} \ln (2+\sqrt{3})+\frac{4}{3} G\right]}_{(*)} -2  \underbrace{\pi \ln 2}_{(**)} \\
&=-\pi \ln 2+\frac{2 \pi}{3} \ln (2+\sqrt{3})+\frac{8}{3} G
\end{aligned}
$$
Note:
(*): post 1, (**):post 2

For the second integral, we use the similar technique and arrive at
\begin{aligned}
J&=2 \int_{0}^{\infty} \frac{\ln 2+\ln \left(1-t+t^{2}\right)-\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\
&=2 \int_{0}^{\infty} \frac{\ln 2}{1+t^{2}} d t+2 \int_{0}^{\infty} \frac{\ln \left(1-t+t^{2}\right)}{1+t^{2}} d t-2 \int \frac{\ln \left(1+t^{2}\right)}{1+t^{2}} d t \\
&=\pi \ln 2+2  \underbrace{\left(\frac{2 \pi}{3} \ln (2+\sqrt{3})-\frac{4}{3} G\right)}_{(***)}-2 \pi \ln 2 \\
&=-\pi \ln 2+\frac{4 \pi}{3} \ln (2+\sqrt{3})-\frac{8}{3} G
\end{aligned}
Note:(***) post 3
Eager to know whether there are any alternatives!
Comments and alternative solutions are highly appreciated.
 [/INST] Let $ I_{\pm}=\int_0^{\pi/2}\ln(2\csc2x\pm 1)dx$ and evaluate
\begin{align}
I_+ +I_- =& \int_0^{\pi/2}\ln(4\csc^2 2x-1)dx
=\int_0^{\pi/2}\ln(\tan^4 x+\sec^2x)dx\\
=& \int_0^{\pi/2}\int_0^1 \frac{2y\sec^2 x}{\tan^4 x+y^2(1+\tan^2x)}dy\ dx\\
=&\int_0^1 \frac\pi{\sqrt{(y+1)^2-1}}dy=\pi\ln(2+\sqrt3)\\
\\
 I_+ -I_- =& \int_0^{\pi/2}\ln\frac{2\csc 2x+1}{2\csc 2x-1} dx
=\int_0^{\pi/2}\ln\frac{1+\frac12\sin 2x}{1-\frac12\sin 2x} dx\\
=& \int_0^{\pi/2} \int_{0}^{\pi/12}
\frac {4\cos 2y \sin 2x}{1-\sin^2 2x \sin^2 2y} dy \ dx
=\int_{0}^{\pi/12} \frac{8y }{\sin 2y }\ dy\\
\overset{ibp}=& \ -\frac{\pi}3\ln\tan\frac\pi{12}- 4 \int_{0}^{\pi/12} \ln (\tan y) \ dy
=- \frac{\pi}3\ln(2+\sqrt3)+\frac{8}3G
\end{align}
Then
\begin{align}
\int_{0}^{\pi} \ln (2\pm \sin x) d x
= & \int_{0}^{\pi} \ln (\sin x) d x+ 2I_\pm \\
= & -\pi \ln 2+\frac{(3\mp 1) \pi}{3} \ln (2+\sqrt{3})\pm \frac{8}{3} G
\end{align}
</s>