I have the following formula I´d like to prove:
Given a holomorphic function $f:U\to \mathbb C$ such that $\overline{D_r(0)}\subset U$, $f(0)\neq 0$ and $f(z)\neq 0$ for $z\in \partial D_r(0)$, we name the zeros (counted with multiplicities) $z_1, \ldots , z_n$. Then we have to show that:
$$\frac{1}{2\pi} \int_0^{2\pi} \log |f(re^{i\theta})| d\theta = \log|f(0)|+\sum_{j=1}^n \log(r|z_j|^{-1})$$
I thought that I have to use the integral formula by Cauchy to relate the integral on the boundary of $D_r(0)$ with the values in the interior of $D_r(0)$, but as $\log |f(re^{i\theta})|$ is barely holomorphic, the formula doesn´t apply. Next, I got the hint to first consider the case that $f$ has no zeros at all, and for such a function we know that there is a holomorphic $h:U\to \mathbb C$ with $h(0)=0$ and $f(z)= f(0)e^{h(z)}$. So I tried to apply this, but also can´t get to an end.
I would appreciate any hint, either to the total question or to the special case. Thanks
OK, let's start out with the case of no zeros. As you said, $f(z) = f(0) e^{h(z)}$, so $|f(z)| = |f(0)| e^{\text{Re}(h(z))}$ and $\log |f(z)| = \log |f(0)| + \text{Re}(h(z))$. $\text{Re(h(z))}$ is a harmonic function, so its average around the circle is the value at the centre of the circle, namely $\text{Re(h(0))} = 0$. This gives you the formula in the case of no zeros.
Now try it in general. You have a similar formula for $f$, but with extra factors corresponding to the zeros:
$$ f(z) = f(0) \dfrac{z - z_1}{0 -z_1} \ldots \dfrac{z - z_n}{0 - z_n} e^{h(z)}$$ and you need to compute the contributions of those extra factors, which had better be
$$ \dfrac{1}{2\pi} \int_{0}^{2\pi} \log \left| \dfrac{r e^{i\theta} - z_j}{-z_j}\right| \; d\theta = \log(r |z_j|^{-1})$$
Since this depends only on $r |z_j|^{-1}$, what you want is that
$$ \int_0^{2\pi} \log |t e^{i\theta} - 1|\; d\theta = 2 \pi \log(t)$$ for $t > 1$. Note that $|t e^{i\theta} - 1| = t |1 - e^{-i\theta}/t|$ and $$\log |1 - e^{-i\theta}/t| = \text{Re} \log(1 - e^{-i\theta}/t) = \text{Re} \left( 1 + \dfrac{e^{-i\theta}}{t} + \dfrac{e^{-2 i \theta}}{2 t^2} + \ldots \right)$$