Let $$K(k) = \int_{0}^{\pi/2}\frac{dx}{\sqrt{1 - k^{2}\sin^{2} x}}$$ be the complete elliptic integral of first kind where $0 < k < 1$. Let $k' = \sqrt{1 - k^{2}}$ be the complementary modulus.
It is a standard result that as $x \to 1^{-}$ we have $$2K(\sqrt{x}) = -\log(1 - x) + A + o(1)$$ where $A$ is a positive constant and $o(1)$ denotes a term tending to zero as $x \to 1^{-}$.
I have also found two different approaches (from various online sources) to find value of constant $A$ and both give different values of $A$ so that one of the approaches is probably wrong. But I am not able to find fault in any of the approaches. Perhaps its a bit subtle mistake which I am overlooking. Please help me out in figuring this.
Approach 1: Clearly we have $$2K(\sqrt{x}) = 2\int_{0}^{\pi/2}\frac{dt}{\sqrt{1 - x\sin^{2}t}} = 2\int_{0}^{1}\frac{dt}{\sqrt{(1 - t^{2})(1 - xt^{2})}}$$ and $$\int_{0}^{1}\frac{x}{1 - xt}\,dt = -\log(1 - x)$$ so that we have $$2K(\sqrt{x}) + \log(1 - x) = \int_{0}^{1}\left(\frac{2}{\sqrt{(1 - t^{2})(1 - xt^{2})}} - \frac{x}{1 - xt}\right)\,dt$$ As $x \to 1^{-}$ the integral on right tends to $$\int_{0}^{1}\left(\frac{2}{1 - t^{2}} - \frac{1}{1 - t}\right)\,dt = \int_{0}^{1}\frac{dt}{1 + t} = \log 2$$ so that the value of constant $A$ is $A = \log 2$.
Approach 2: Since $$2K(\sqrt{x}) = -\log(1 - x) + A + o(1)$$ as $x \to 1^{-}$, putting $x = 1 - k^{2}$ and letting $k \to 0^{+}$ we see that $$2K(k') = -2\log k + A + o(1)$$ or $$K(k') = -\log k + (A/2) + o(1)$$ as $k \to 0^{+}$.
Now $$\begin{aligned}K(k') &= \int_{0}^{\pi/2}\frac{dx}{\sqrt{1 - k'^{2}\sin^{2}x}}\\ &= \int_{0}^{\pi/2}\frac{k'\sin x}{\sqrt{k^{2} + k'^{2}\cos^{2}x}}\,dx + \int_{0}^{\pi/2}\frac{1 - k'\sin x}{\sqrt{1 - k'^{2}\sin^{2}x}}\,dx\\ &= \int_{0}^{k'}\frac{dt}{\sqrt{k^{2} + t^{2}}} + \int_{0}^{\pi/2}\sqrt{\frac{1 - k'\sin x}{1 + k'\sin x}}\,dx\\ &= \log((1 + k')/k) + I\end{aligned}$$ Clearly $I$ tends to $$\int_{0}^{\pi/2}\sqrt{\frac{1 - \sin x}{1 + \sin x}}\,dx = \log 2$$ as $k \to 0^{+}$. Thus we get $K(k') = \log(2(1 + k')/k) + o(1)$ as $k \to 0^{+}$. Now we can see that $$\log\left(\frac{2(1 + k')}{k}\right) = \log\left(\frac{4}{k}\right) + \log\left(\frac{1 + k'}{2}\right) = \log(4/k) + o(1)$$ as $k \to 0^{+}$. It follows that $K(k') = -\log k + \log 4 + o(1)$ as $k \to 0^{+}$. Therefore we get $A/2 = \log 4$ or $A = \log 16$.
Update: After numerical feedback from @gammatester and also the wolfram reference my belief in the validity of second approach has increased significantly. With this value of $A = \log 16$ it is possible to prove that $$\lim_{k \to 0^{+}}\frac{1}{k^{2}}\cdot\exp\left(-\pi\frac{K(k')}{K(k)}\right) = e^{-A} = \frac{1}{16}$$ which can be independently verified by using theta functions with $k = \vartheta_{2}^{2}(q)/\vartheta_{3}^{2}(q)$ and $q = \exp\{-\pi K(k')/K(k)\}$.
To me it seems that in Approach 1, the passage to limit $x \to 1^{-}$ under the integral $$\int_{0}^{1}\left(\frac{2}{\sqrt{(1 - t^{2})(1 - xt^{2})}} - \frac{x}{1 - xt}\right)\,dt$$ is not allowed. But then there should be a way out to show that this integral tends to $\log 16$ (and not $\log 2$) as $x \to 1^{-}$.