I know that
$$\mathcal I = \int\limits_0^{\pi/2}\ln(\cos(x))\,dx = -\frac\pi2 \ln(2)$$
and I am aware of a few different clever ways to demonstrate this result (e.g. MSE 4065767 and MSE 1992462). I would like to know if there's any way to wrap up the method I outline below.
Substituting $t=\tan\left(\frac x2\right)$ yields
$$\mathcal I= 2\int_0^1 \frac{\ln\left(\frac{1-t^2}{1+t^2}\right)}{1+t^2} \, dt = 2 \left(\underbrace{\int_0^1\frac{\ln(1-t^2)}{1+t^2}\,dt}_{\mathcal J^-} - \underbrace{\int_0^1\frac{\ln(1+t^2)}{1+t^2} \, dt}_{\mathcal J^+} \right)$$
Exploiting the series expansion for $\frac1{1+t^2}$, we have
$$\mathcal J^- = \int_0^1 \ln(1-t^2) \sum_{n=0}^\infty (-t^2)^n = \sum_{n=0}^\infty (-1)^n \underbrace{\int_0^1 t^{2n} \ln(1-t^2) \, dt}_{{J_n}^-}$$
and similarly,
$$\mathcal J^+ = \sum_{n=0}^\infty \underbrace{\int_0^1 t^{2n} \ln(1+t^2) \, dt}_{{J_n}^+}$$
I derive the following recurrences for ${J_n}^{\pm}$:
$$\begin{cases}{J_0}^- = 2\ln(2) - 2 \\ {J_n}^- = \frac{2n-1}{(2n+1)^2} - \frac1{2n+1} + \frac{2n-1}{2n+1} {J_{n-1}}^- & \text{for }n\ge1\end{cases}$$
$$\begin{cases}{J_0}^+ = \ln(2) - 2 + \frac\pi2 \\ {J_n}^+ = \frac{2n-1}{(2n+1)^2} - \frac{2\ln(2)-1}{2n+1} - \frac{2n-1}{2n+1}{J_{n-1}}^+ & \text{for }n\ge1\end{cases}$$
where ${J_0}^\pm$ are found by exploiting the series for $\ln(1\pm t)$ and several others derived from the expansion of $\frac1{1-t}$. I managed to solve these for ${J_n}^{\pm}$, so that
$$\mathcal J^- = \frac{(\ln(2)-1)\pi}2 + \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \left(\sum_{i=0}^{n-1} \frac{2i+1}{2i+3} - n\right)$$
$$\mathcal J^+ = \frac{\pi^2-3\pi}8 + \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \sum_{i=0}^{n-1} (-1)^i \frac{2i+1}{2i+3}$$
Barring any mistakes, the remaining sum seems to be
$$2 \sum_{n=0}^\infty \frac{(-1)^n}{2n+1} \left(\sum_{i=0}^{n-1} (1-(-1)^i) \frac{2i+1}{2i+3} - n\right) = \frac{3\pi}2\ln(2) - \frac{\pi^2}4 - \frac\pi4$$
but I have no idea where to go with this.
Is there anything I can do to further refine $\mathcal J^- - \mathcal J^+$? I do see a bit of cancellation of terms when $i$ is even, which lets me simplify the inner sum to
$$2\sum_{i=0}^{\left\lfloor\frac{n-1}2\right\rfloor} \frac{4i+1}{4i+3} - n$$
but that doesn't seem helpful.
We do have, with $H_n$ the $n$-th harmonic number,
$$\sum_{i=0}^{n-1} \frac{2i+1}{2i+3} = \sum_{i=0}^{n-1}\left(1 - \frac2{2i+3}\right) = n - 2\left(H_{2n+1} - \frac12 H_n - 1\right)$$
though I'm not so sure I can write its alternating counterpart in $\mathcal J^+$ in a similar way. Then
$$\mathcal J^- = \frac12\ln(2) - \pi - 2 \sum_{n=0}^\infty \frac{(-1)^n H_{2n+1}}{2n+1} + \sum_{n=0}^\infty \frac{(-1)^n H_n}{2n+1} = \frac{2\ln(2)-\pi}4 - G$$