I assume this is what you did
$-\log(1-x)=\sum_{n=1}^{\infty}\frac{x^n}{n}$
Then
$-\frac{\log(1-x)} x=\sum_{n=1}^{\infty}\frac{x^{n-1}}{n}$
The series is clearly valid for $[-1,1)$, since for $x=-1$ we get the alternating harmonic series, which converges to $\log 2$. We now integrate termwise in the interval $(0,x)$, getting
$-\int_0^x\frac{\log(1-t)} tdt=\sum_{n=1}^{\infty}\frac{x^{n}}{n^2}$
What happens if we let $x=1$?
$-\int_0^1\frac{\log(1-t)} tdt=\sum_{n=1}^{\infty}\frac{1}{n^2}$
The series converges and is $\dfrac{\pi^2}{6}$, so the integral can be assigned this value. You can also try changing some variables to get a "nicer" integral:
$1 - t = {e^{ - h}}$
$\int_0^\infty {\frac{h}{{{e^h} - 1}}} dh$
When $h \to \infty$ the integral goes rapidly to $0$, and when $h \to 0$ the integral goes to $1$, so there is no "bad" singularity to worry about.