Let $I(x)$ be the integral
$$I(x)=\int_0^{\pi/2}\frac{\log(1+x\sin^2 \theta)}{\sin^2\theta}d\theta$$
and assume that $x>0$ is real-valued.
Now, taking a derivative with respect to $x$ gives
$$I'(x)=\int_0^{\pi/2}\frac{1}{1+x\sin^2\theta}d\theta=\frac{\pi}{2\sqrt{1+x}}$$
where this latter integral was evaluated using contour integration.
Next, integration of $I'(x)$ gives
$$I(x)=\pi\sqrt{1+x}+C$$
where $C$ is found by noting $I(0)=0$. Thus, $C=-\pi$.
Finally, we have
$$I(x)=\pi(\sqrt{1+x}-1)$$
NOTE:
Here, we will evaluate $\int_0^{\pi/2}\frac{1}{1+x\sin^2\theta}d\theta$ for $x<0$ using contour integration. Note that in general, we have
$$\begin{align}
\int_0^{\pi/2}\frac{1}{1+x\sin^2\theta}d\theta & = \int_0^{\pi/2}\frac{1}{1+x\left(\frac{1-\cos 2\theta}{2}\right)}d\theta \tag 1 \\\\
&=-\frac{1}{2x}\int_0^{2\pi}\frac{1}{\cos \theta-a}d\theta \tag 2
\end{align}$$
where $a=\frac{2+x}{x}=1+\frac2x$. In going from $(2)$ to $(3)$ we exploited the periodicity of the cosine function and effected the substitution $2x \to x$.
Next, we move to the complex plane by letting $z=e^{i\theta}$ so that $dz=ie^{i\theta}dz$ and the integration is over the closed-contour unit circle$C$, for which $|z|=1$. Then, we have
$$\begin{align}
-\frac{1}{2x}\int_0^{2\pi}\frac{1}{\cos \theta-a}d\theta &=-\frac{1}{ix}\oint_C \frac{dz}{z^2-2az+1}\\\\
&=-\frac{2\pi}{x}\text{Res}\left(\frac{1}{(z-a+\sqrt{a^2-1})(z-a-\sqrt{a^2-1})}\right)\\\\
&=-\frac{2\pi}{x}\text{Res}\left(\frac{1}{(z-\frac{x+2}{x}-\frac{2\sqrt{x+1}}{|x|})(z-\frac{x+2}{x}+\frac{2\sqrt{x+1}}{|x|})}\right)
\end{align}$$
There are three cases we need to examine.
Case 1: $x>0$
For $x>0$, the only pole is at $z=\frac{x+2-2\sqrt{x+1}}{x}$. The residue is thus $-\frac{x}{4\sqrt{x+1}}$ and we have
$$I'(x)=\frac{\pi}{2\sqrt{x+1}}$$
Case 2:
For $<-1x<0$, the only pole is at $z=\frac{x+2}{x}+2\frac{\sqrt{x+1}}{|x|}=\frac{x+2-2\sqrt{x+1}}{x}$. The residue is $-frac{x}{4\sqrt{x+1}} and we have
$$I'(x)=\frac{\pi}{2\sqrt{x+1}}$$
Case 3:
For $x<-1$, we note that $|\frac{x+2}{x}+2\frac{\sqrt{x+1}}{|x|}|=1$ and the poles are complex conjugates residing on the unit circle. Thus, the integral diverges.
We can intepret, however, a Cauchy Principal value of the integral. Here, we exclude the poles by modifying the contour $C$ with a semi-circle deformation around each pole. The two contributions from integration around the deformations are equal in magnitude and of opposite sign. Thus, we have
$$I'(x)=0$$