A closed form for integral $\int_0^\infty \frac{\ln(1-e^{-\pi x})}{1+x^2} dx$ $$\int_0^\infty \frac{\ln(1-e^{-\pi x})}{1+x^2} dx$$
let $u=e^{-\pi x}$, the integral goes to:
$$\pi \int_0^1 \frac{1}{u}\cdot\frac{\ln(1-u)}{\pi^2+\ln^2(u)}du$$
This looks a little like Gregory's coefficient, but not the same, because the integral is from $0$ to $1$, instead of from $0$ to $\infty$. How to do next?
 A: A solution using contour integration. For "small" $r>0$, let $D_r$ be the disk $|z|<1$ with "notches of size $r$" around the point $z=1$ and the negative real axis. Formally, say $$D_r=\{z\in\mathbb{C}:r<|z|<1\land|1-z|>r\land(\Re z>0\lor\Im z>r)\}.$$ Its boundary is $\partial D_r=C_r^0\cup C_r^1\cup C_r^+\cup C_r^-\cup L_r^+\cup L_r^-$, where $C_r^0$ and $C_r^1$ are arcs of radius $r$ around $z=0$ and $z=1$, $C_r^+$ and $C_r^-$ are arcs of $|z|=1$ in the upper/lower half-plane, and finally $L_r^+$ and $L_r^-$ are line segments. Then $\int_{\partial D_r}f(z)\,dz=0$, where $f(z)=\frac{\log(1+z)}{z\log z}$ with the principal values taken. But (using the "half-residue" trick for $C_r^1$)
\begin{align*}
\lim_{r\to 0}&\int_{C_r^0}f(z)\,dz=0,\\
\lim_{r\to 0}&\int_{C_r^1}f(z)\,dz=-i\pi\operatorname*{Res}_{z=1}f(z)=-i\pi\log2,\\
\lim_{r\to 0}&\int_{C_r^+\cup C_r^-}f(z)\,dz=\int_0^\pi\frac{\log(1+e^{it})-\log(1+e^{-it})}{t}dt=i\pi,\\
\lim_{r\to 0}&\int_{L_r^+\cup L_r^-}f(z)\,dz=\int_0^1\frac{\log(1-t)}{t}\left(\frac1{\log t-i\pi}-\frac1{\log t+i\pi}\right)dt=2iI
\end{align*}
where $I=\pi\int_0^1\frac{\log(1-t)}{\pi^2+\log^2 t}\frac{dt}{t}$ is the given integral (as in the OP). Hence $I=\frac\pi2(\log2-1)$.
A: Similar to the evaluation of $\int_{0}^{\infty} \operatorname{Li}_{2}(e^{-\pi x}) \arctan(x) \, \mathrm dx$ here, we have $$ \begin{align} \int_{0}^{\infty} \frac{\ln(1-e^{-\pi x})}{1+x^{2}} \, \mathrm dx &= -\int_{0}^{\infty} \frac{1}{1+x^{2}} \sum_{n=1}^{\infty} \frac{e^{- \pi n x}}{n} \, \mathrm dx\\ &=   -\sum_{n=1}^{\infty} \frac{1}{n} \int_{0}^{\infty} \frac{e^{- \pi n x}}{1+x^{2}} \, \mathrm dx \\ &= - \sum_{n=1}^{\infty} \frac{1}{n} \left( \left(\frac{\pi}{2} - \operatorname{Si}(\pi n) \right) \cos(\pi n) + \operatorname{Ci}(\pi n ) \sin(\pi n ) \right) \\ &= \frac{\pi}{2}\sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n} + \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} \\ &=  \frac{\pi}{2} \ln(2) + \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n}, \end{align}$$
where $\operatorname{Si}(z)$ is the sine integral and $\operatorname{Ci}(z)$ is the cosine integral.
(Justification for interchanging the order of summation and integration comes from Tonelli's theorem.)
To show that $$\sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} = - \frac{\pi}{2}, $$ we can integrate the meromorphic function $$f(z) = \frac{\pi \csc(\pi z) \operatorname{Si}(\pi z)}{z}$$ around a rectangular contour with vertices at $z= \pm  \left(N+ \frac{1}{2} \right) \pm i\left(N+ \frac{1}{2} \right),$ where $N$ is a positive integer.
As $|z| \to \infty$ in $ -\pi < \arg(z) < \pi$ , we have $$f(z) \sim \frac{\pi \csc(\pi z) \left(\frac{\pi}{2}- \frac{\cos(\pi z)}{\pi z}   \right) }{z} = \frac{\pi^{2} \csc(\pi z)}{2z} - \frac{\cot(\pi z)}{z^{2}}.$$
(EDIT: As explained here, the asymptotic expansion of $\operatorname{Si}(z)$ for large complex $z$ can derived from the identity $$ \operatorname{Si}(z) = \frac{\pi}{2} - \cos(z) \int_{0}^{\infty} \frac{e^{-zt}}{1+t^{2}} \, \mathrm dt - \sin(z) \int_{0}^{\infty} \frac{te^{-zt}}{1+t^{2}} \, \mathrm dt \, , \quad \Re(z)  >0$$ using Watson's lemma.)
Therefore, for reasons explained in the answers to this question, the integral vanishes on all sides of the rectangular contour as $N \to \infty$.
So we have $$ \begin{align} 0 &= 2 \pi i \sum_{n=-\infty}^{\infty}\operatorname{Res}[f(z), n]  \\ &= 2 \pi i \left( \sum_{n=-\infty}^{-1} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} + \pi + \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} \right)  \\ &= 2 \pi i \left(2 \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si}(\pi n)}{n} + \pi \right), \end{align}$$ and the result follows.

Alternatively, $$ \begin{align} \sum_{n=1}^{\infty} (-1)^{n} \frac{\operatorname{Si} (\pi n)}{n} &= \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n} \int_{0}^{\pi n} \frac{\sin t}{t} \, \mathrm dt  \\ &=  \sum_{n=1}^{\infty} \frac{(-1)^{n}}{n} \int_{0}^{\pi} \frac{\sin (n u)}{u} \, \mathrm du  \\ &= \int_{0}^{\pi} \frac{1}{u} \sum_{n=1}^{\infty} (-1)^{n} \frac{\sin (n u)}{n} \, \mathrm du  \\ &= - \int_{0}^{\pi} \frac{1}{u} \, \arctan \left(\tan\frac{ u}{2} \right) \, \mathrm du \\ &= - \int_{0}^{\pi} \frac{1}{u} \frac{u}{2} \, \mathrm du\\ &= - \frac{\pi}{2}. \end{align}$$
A: Utilize $\tan^{-1}x=\int_0^\infty 
\frac{e^{-y}}{y} \sin xy \  dy$ and $\int_{0}^{\infty}{\sin xy \over e^{\pi x} - 1}dx = \frac12\coth y -\frac1{2y}$ below
\begin{align}
\int_0^\infty \frac{\ln(1-e^{-\pi x})}{1+x^2} dx
\overset{ibp}=& 
\pi \int_0^\infty \frac{\tan^{-1}x}{1-e^{\pi x}} dx
= \pi \int_0^\infty \int_0^\infty \frac{\sin xy }{1-e^{\pi x}}
\frac{e^{-y}}{y} dy\ dx\\
=& \ \frac\pi2\int_0^\infty e^{-y}(1-y\coth y )\ d(\frac1y)\\
 \overset{ibp}=& \ \frac\pi2\int_0^\infty \frac{g(y)-g(\frac y2)}y - e^{-y}\ dy
=\frac\pi2 \ln2 -\frac\pi2
\end{align}
where the Frullani integral for $g(y)=\coth y- y\ \text{csch}^2 y$ is applied.
A: Many nice solutions are posted; let's add one more. We will get the general formula (which, in turn, can be easily transformed into Binet's second formula) by means of complex integration.
Let's denote $\,I(a)=\displaystyle \int_0^\infty\frac{\ln(1-e^{-2\pi ax})}{1+x^2}dx$, and $$J(a)=\frac{\partial}{\partial a}I(a)=2\pi\int_0^\infty\frac{x}{1+x^2}\frac{e^{-2\pi ax}}{1-e^{-2\pi ax}}dx=\pi\int_0^\infty(\coth\pi ax-1)\frac{x}{1+x^2}dx$$
Integrating by part,
$$J(a)=\frac{\pi^2 a}{2}\int_0^\infty\frac{\ln(1+x^2)}{\sinh^2\pi ax}dx=\frac{\pi^2 }{2}\int_0^\infty\Big(\frac{\ln(a^2+t^2)}{2\sinh^2\pi t}-\frac{\ln a}{\sinh^2\pi t}\Big)dt$$
We introduce $r\ll1$ to make regularization:
$$J(a)=\lim_{r\to0}\Big(-\pi^2\ln a\int_r^\infty\frac{dt}{\sinh^2\pi t}+\frac{\pi^2}{2}\int_r^\infty\frac{\ln(a^2+t^2)}{\sinh^2\pi t}dt\Big)\tag 1$$
Evaluation of the first integral gives
$$J_{1r}=-\pi^2\ln a\int_r^\infty\frac{dt}{\sinh^2\pi t}=-\frac{\ln a}{r}+\pi\ln a+O(r)\tag 2$$
To evaluate
$$J_{2r}=\frac{\pi^2}{2}\int_r^\infty\frac{\ln(a^2+t^2)}{\sinh^2\pi t}dt=\frac{\pi^2}{2}\Re\Big(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln(a-it)}{\sinh^2\pi t}dt\Big)$$
we use $\,\displaystyle\ln(a-it)=\ln\Gamma\big(a-i(t+i)\big)-\ln\Gamma\big(a-it\big)$ and $\,\displaystyle\sinh^2\pi (t+i)=\sinh^2\pi t$, and consider the integral in the complex plane along the following contour:

There are no poles inside the contour; integrals $[1]$ and $[2]$ tend to zero at $R\to\infty$.
Therefore,
$$0=-\frac{\pi^2}{2}\oint\frac{\ln\Gamma(a-iz)}{\sinh^2\pi z}dz$$
$$=\frac{\pi^2}{2}\Big(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln\Gamma(a-it)}{\sinh^2\pi t}dt\Big)-\frac{\pi^2}{2}\Big(\int_{-\infty}^{-r}+\int_r^\infty\frac{\ln\Gamma(a+1-it)}{\sinh^2\pi t}dt\Big)+I_{C_1}+I_{C_2}$$
Where $I_{C_1}, I_{C_2}$ - integral along small arches around $z=0, z=i$.
Taking the real part,
$$J_{2r}=-\Re\,(I_{C_1}+I_{C_2})=\frac{\pi^2}{2}\Re\Big(\int_\pi^0\frac{\ln\Gamma(a-ire^{i\phi})}{\sinh^2(\pi re^{i\phi })}ire^{i\phi}d\phi+\int_{2\pi}^\pi\frac{\ln\Gamma(a+1-ire^{i\phi})}{\sinh^2(\pi re^{i\phi})}ire^{i\phi}d\phi\Big)$$
Decomposing $\ln\Gamma(z)$ near $z=a; z=a+1$
$$J_{2r}=\frac{\ln \Gamma(a)-\ln\Gamma(1+a)}{2r}\int_0^\pi (-i)e^{-i\phi}d\phi-\frac{\psi(a)}{2}\int_\pi^0d\phi-\frac{\psi(a+1)}{2}\int_{2\pi}^\pi d\phi+O(r)$$
$$J_{2r}=\frac{\ln a}{r}-\frac{\pi}{2}\big(\psi(a)+\psi(a+1)\big)+O(r)\tag 3$$
Putting $(2)$ and $(3)$ into $(1)$
$$J(a)=\lim_{r\to0}\big(J_{1r}+J_{2r}\big)=\lim_{r\to0}\Big(-\frac{\ln a}{r}+\pi\ln a+\frac{\ln a}{r}-\frac{\pi}{2}\big(\psi(a)+\psi(a+1)\big)+O(r)\Big)$$
$$J(a)=\pi\ln a-\frac{\pi}{2}\big(\psi(a)+\psi(a+1)\big)\tag 4$$
Integrating $(4)$
$$I(a)=\pi(a\ln a-a)-\frac{\pi}{2}\big(\ln\Gamma(a)+\ln\Gamma(a+1)\big)+C\tag 5$$
To identify the constant $C$, we can consider the limit $a\to 0$:
$$\int_0^\infty\frac{\ln(1-e^{-2\pi ax})}{1+x^2}dx=\int_0^\infty\frac{\ln(2\pi ax)}{1+x^2}dx+O(a\ln a)=\frac{\pi}{2}\ln(2\pi a)+O(a\ln a)$$
On the other hand, from $(5)$ follows
$$I(a)=\frac{\pi}{2}\ln a+C+O(a\ln a)\,\,\Rightarrow\,\,C=\frac{\pi}{2}\ln(2\pi)$$
$$\boxed{\,\,I(a)=\int_0^\infty\frac{\ln(1-e^{-2\pi ax})}{1+x^2}dx=\pi\big(a\ln a-a\big)-\pi\ln\Gamma(a+1)+\frac{\pi}{2}\ln(2\pi a)\,\,}$$
A: Some related integrals:
In the book "Table of Integrals, Series, and Products" (7th Edition, 2007)
by I.S. Gradshteyn and I.M. Ryzhik, I found the following integrals (in Page 568, 4.318 and 4.319):
(1) For $q > 0$, we have
$$\int_0^1 \frac{1}{x}\cdot \frac{\ln(1 - x^q)}{1 + \ln^2 x}\,\mathrm{d} x 
= \pi\left[-\ln \Gamma\left(\frac{q}{2\pi}\right) - \frac{\ln q}{2} + \frac{q}{2\pi}\left(\ln \frac{q}{2\pi} - 1\right) + \ln 2\pi\right].$$
(2) For $a > 0$, it holds that
$$\int_0^\infty \frac{\ln(1 - \mathrm{e}^{-2a\pi x})}{1 + x^2}\,\mathrm{d} x
= \pi \left[\frac12\ln 2a\pi + a(\ln a - 1) - \ln \Gamma(a + 1)\right].$$
Remark 1: One can prove them using @Gary's formula.
Remark 2: I think there are typos in the formulas (1) and (2) in the book (see picture below). The above formulas are the corrected. Can someone verify the formulas (typos)?

A: Integrating by parts in Binet's second formula yields
$$
\log \Gamma (z) = \left( {z - \frac{1}{2}} \right)\!\log z - z + \frac{1}{2}\log (2\pi ) - \frac{1}{{\pi z}}\int_0^{ + \infty } {\frac{{\log (1 - \mathrm{e}^{ - 2\pi t} )}}{{1 + t^2 /z^2 }}\mathrm{d}t} ,\quad \operatorname{Re}(z)>0.
$$
Taking $t=x/2$ and $z=1/2$ then gives
$$
\log \Gamma\! \left( {\frac{1}{2}} \right) =  - \frac{1}{2} + \frac{1}{2}\log (2\pi ) - \frac{1}{\pi }\int_0^{ + \infty } {\frac{{\log (1 - \mathrm{e}^{ - \pi x} )}}{{1 + x^2 }}\mathrm{d}x} ,
$$
i.e.,
$$
\int_0^{ + \infty } {\frac{{\log (1 - \mathrm{e}^{ - \pi x} )}}{{1 + x^2 }}\mathrm{d}x}  = \frac{\pi }{2}(\log (2) - 1),
$$
since $\Gamma(1/2)=\sqrt\pi$.
