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.
 A: $$I(a)=\int_{0}^{\pi} \log (a\sin (x)+2)\, dx$$
$$I'(a)=\int_{0}^{\pi} \frac{\sin (x)}{a \sin (x)+2}\, dx=\frac \pi a-\frac{2 \pi }{a \sqrt{4-a^2}}+\frac{4 \tan ^{-1}\left(\frac{a}{\sqrt{4-a^2}}\right)}{a \sqrt{4-a^2}}$$
$$\int_0^1 \Bigg[\frac \pi a-\frac{2 \pi }{a \sqrt{4-a^2}}\Bigg]\,da=\pi  \log \left(\frac{2+\sqrt{3}}{4} \right)$$
$$\frac{4 \tan ^{-1}\left(\frac{a}{\sqrt{4-a^2}}\right)}{a \sqrt{4-a^2}}=\sum_{n=0}^\infty \frac{(n!)^2}{(2 n+1)!} a^{2n}$$
$$\int_0^1 \frac{4 \tan ^{-1}\left(\frac{a}{\sqrt{4-a^2}}\right)}{a \sqrt{4-a^2}}\, da=\sum_{n=0}^\infty \frac{(n!)^2}{(2 n+1) (2 n+1)!}=\frac{1}{3} \left(8 C-\pi  \log \left(2+\sqrt{3}\right)\right)$$
Edit
Trying to generalize
$$I(a,b)=\int_{0}^{\pi} \log (a\sin (x)+b)\, dx$$
$$I'(a,b)=\int_{0}^{\pi} \frac{\sin (x)}{a \sin (x)+b}\, dx=\frac{\pi }{a}-\frac{\pi  b}{a \sqrt{b^2-a^2}}+\frac{2 b}{a \sqrt{b^2-a^2}}\tan ^{-1}\left(\frac{a}{\sqrt{b^2-a^2}}\right)$$
$$\int_0^1 \Bigg[\frac{\pi }{a}-\frac{\pi  b}{a \sqrt{b^2-a^2}}\Bigg]\,da=\pi  \log \left(\frac{b+\sqrt{b^2-1}}{2 b}\right)$$
Using series expansion again
$$\int_0^1\frac{2 b}{a \sqrt{b^2-a^2}}\tan ^{-1}\left(\frac{a}{\sqrt{b^2-a^2}}\right)\,da=\sum_{n=0}^\infty \frac {\alpha_n}{\beta_n}\, b^{-(2n+1)}$$ the $\alpha_n$ and $\beta_n$ corresponding respectively to sequences $A101926$ and $A321234$ in $OEIS$.
A: 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}
A: To evaluate the second integral, we may use their product.
$$\int_{0}^{\pi} \ln (\sin x+2) d x+ \int_{0}^{\pi} \ln (2-\sin x) d x = 2\int_{0}^{\pi/2} \ln (4-\sin^2 x) d x $$
Using my post,
$$\begin{aligned}\int_{0}^{\pi} \ln (2-\sin x) d x &=2 \pi \ln \left(\frac{2+\sqrt{3}}{2}\right) -\left(-\pi \ln 2+\frac{2 \pi}{3} \ln (2+\sqrt{3})+\frac{8}{3} G \right)\\&= -\pi \ln 2+\frac{4 \pi}{3} \ln (2+\sqrt{3})-\frac{8}{3} G \end{aligned}$$
