Showing $\int_0^{2\pi} \log|1-ae^{i\theta}|d\theta=0$

This is a homework problem for a second course in complex analysis. I've done a good bit of head-bashing and I'm still not sure how to solve it-- so I might just be missing something here. The task is to show that given $|a|<1$, $$\int_0^{2\pi} \log|1-ae^{i\theta}|d\theta=0.$$

So right off the bat we can let $z=e^{i\theta}$ so that $$\int_0^{2\pi} \log|1-ae^{i\theta}|d\theta=\int_{|z|=1} \log|1-az|\frac{dz}{iz}=-i\int_{|z|=1} \log|1-az|{dz}.$$

After that I'm not sure if using the residue theorem is the way to go?

-
What the range of values for $a$? – Norbert Feb 29 '12 at 22:29
Sorry, forgot to add that! We're assume $|a|<1$. – Jay C Feb 29 '12 at 22:38
I made that assumption since the log has a branch cut through the path of integration otherwise. – robjohn Feb 29 '12 at 22:53
You lost a $z$ in the denominator. – Robert Israel Mar 1 '12 at 0:18
Thanks for the help everyone! Just one more question: apparently equality holds if $a=1$, but I don't really see how this works. Could anyone care to elaborate a bit? – Jay C Mar 1 '12 at 8:33

Note that $\log|1-ae^{i\theta}|$ is the real part of $\log(1-ae^{i\theta})$. Then try differentiating with respect to $a$. Then notice that integrating around the unit circle $$\frac1i\oint\frac{\mathrm{d}z}{1-az}=0$$ when $|a|<1$.
Consider the function $\log(1-a\,z)$ and think mean value.