Let $D\subset \mathbb{C}$ be a domain and define $f: D \rightarrow \mathbb{C}$ by $f(z)=\frac{z-a}{z-b}$, where $a,b \in \mathbb{C}\setminus D$ are in the same connected component of $\mathbb{C}\setminus D$. I want to show that there exists a holomorphic branch of the logarithm of $f$ on $D$.
I would like to use the following theorem regarding the existence of a holomorphic log:
Let $D$ be a simply connected domain, $f: D \rightarrow \mathbb{C}^*$ holomorphic, $z_0\in D$, and $w_0$ a log of $f(z_0)$. Then there exists a unique $g: D \rightarrow \mathbb{C}$, a holomorphic function, such that $g$ is a branch of the log of $f$ and such that $g(z_0)=w_0.$
My issue with applying this theorem is that the assumption is that $D$ be simply connected, whereas I would like to prove the above problem where we assume only that $D$ is a domain. My first thought was to take some small enough ball contained in $D$, which is a simply connected domain, and apply the theorem to that small ball to guarantee the existence of a holomorphic branch of the log of $f$ on that simply connected domain. However I'm not sure how I could extend this to be true of the whole of $D$. Does anyone know how I could proceed?
Why don't we try to construct this logarithm, using the ideas from the proof of the result that you quote?
Define $g: D \to \mathbb C$ by $$ g(z) := \frac{f'(z)}{f(z)} = \frac{1}{z - a} - \frac{1}{z - b}.$$
Our objective is to construct a holomorphic function $G: D \to \mathbb C$ such that $G' = g$ on $D$. If we succeed, then this $G$ will be a logarithm of $f$. (Check this!)
The idea is to define $$ G(z) := \int_{\alpha_{z_0 \to z}} g(w) \ dw,$$ where $\alpha_{z_0 \to z}$ is a path in $D$ from some fixed point $z_0 \in D$ to an arbitrary point $z \in D$.
But for this definition to make sense, we need to ensure that our definition is independent of the choice of path $\alpha_{z_0 \to z}$.
If $D$ were simply connected, then this would be a direct consequence of Cauchy's theorem. Unfortunately, $D$ is not necessarily simply connected, so we have to work a little harder.
So suppose that $\alpha_{z_0 \to z}$ and $\alpha'_{z_0 \to z}$ are two different paths in $D$ from $z_0$ to $z$. Let $\gamma$ be the closed loop formed by traversing $\alpha_{z_0 \to z}$ in the forward direction then traversing $\alpha'_{z_0 \to z}$ in the reverse direction.
Then $$ \int_{\alpha_{z_0 \to z}} g(w) \ dw - \int_{\alpha'_{z_0 \to z}} g(w) \ dw = \oint_{\gamma} g(w) \ dw = 2\pi i \times (\text{Ind}_\gamma (a) - \text{Ind}_\gamma(b)),$$ where $ \text{Ind}_\gamma (a)$ and $ \text{Ind}_\gamma (b)$ are the winding numbers of $\gamma$ around $a$ and $b$ respectively.
But $a$ and $b$ are in the same connected component of $\mathbb C \setminus D$, and hence are also in the same connected component of $\mathbb C \setminus \gamma^\star$. Therefore, $ \text{Ind}_\gamma (a)$ is equal to $ \text{Ind}_\gamma (b)$. (See the theorem in the Wikipedia article I linked, or see Rudin Theorem 10.10.)
So $$ \int_{\alpha_{z_0 \to z}} g(w) \ dw = \int_{\alpha'_{z_0 \to z}} g(w) \ dw, $$ which shows that our definition of $G$ is independent of the choice of path $\alpha_{z_0 \to z}$.
(You also need to prove that our $G$ is holomorphic. I'll leave that to you.)