It can be proven that on a simply connected set $U$ in $\mathbb{C}$ where a function $f$ has no zeroes there is a function $g$ such that $e^g = f$ on $U$. This is done by observing that $\frac{f'}{f}$ is holomorphic and therefore has a "primitive".
I suspect that the requirement that $U$ be simply connected is sufficient, but not required. This comes from an exercise I've been trying to solve:
Consider $U=\mathbb{C} \setminus \{ -1,1 \}$. This set is obviously not simply connected, and the function $f(z) = z^2 -1$ has no zeroes on it. Does there exist an holomorphic function $h$ on $U$ such that $e^{h(z)}=f(z)$ on $U$?
Is there really such a function or is simple-connectedness necessary?
If $f = e^h$ on $U$, $$\oint_C \dfrac{f'(z)}{f(z)} \; dz = \oint_C h'(z) \; dz = 0$$ for any closed contour $C$ in $U$. But (using the residue theorem) if $f$ has zeros inside $C$ (even if they are not in $U$), that integral will not be $0$.