Let $U \subseteq \mathbb{C}$ be an open set and $f: U \rightarrow \mathbb{C}$ be a holomorphic function with $$f(U) \subseteq \{re^{it}: r> 0, -\pi<t<\pi\}$$ for all $z$. I want to show that: $$\int_{\gamma}\frac{f'(z)}{f(z)}dz = 0$$ for all closed smooth paths $\gamma$ in $U$.
The integrand can have no singularities, as the quotient of holomorphic functions it must again be holomorphic. However, Cauchy's integral theorem requires $U$ to be simply connected, which isn't stated in the definition of $U$.
My second attempt was to show that $f =\exp$ using the identity theorem. But that doesn't seem to apply, as $f$ may take any value except for the reals $\le 0$ over $U$.
Is there something we can use to apply Cauchy's integral theorem? Is there another method?