$$f(t;τ) = \frac{1}{\tau}\,e^{-t/\tau},$$ where $\tau$ is the mean time to failure.
$$L(\tau) = \prod_{i=1}^r \frac{1}{\tau} \,e^{-t_i/\tau} \prod_{j=1}^{n-r} e^{-t_r/\tau}.$$
Find the maximum likelihood estimator for $\tau$.
I'm having trouble taking the $\log$ of $L(\tau).$

The likelihood function you wrote would correspond to a sample $\boldsymbol t$ of size $n$ in which $0 \le r \le n$ observations are known event times, and the remaining $n-r$ observations are right-censored at time $t_r$, where event times are assumed to be independent exponential random variables with rate $1/\tau$. Then indeed we have $$\mathcal L(\tau \mid \boldsymbol t) = \prod_{i=1}^r \frac{1}{\tau} e^{-t_i/\tau} \prod_{j=1}^{n-r} e^{-t_r/\tau}.$$ Note that as you have written it, $t_r$ is both the censoring time and the $r^{\rm th}$ event time observed. If this is not your intent, you should use a different notation for the censoring time, say $t_c$. To this end, I will use this notation and you can extract your MLE as the special case when $c = r$.
Immediately, we may write $$\mathcal L(\tau \mid \boldsymbol t) = \tau^{-r} e^{-(\sum_{i=1}^r t_i)/\tau} e^{-(n-r) t_c/\tau},$$ ignoring indicator functions. The log-likelihood is then $$\ell(\tau \mid \boldsymbol t) = -r \log \tau - \frac{1}{\tau} \left(\sum_{i=1}^r t_i + (n-r) t_c \right).$$ The critical points of $\ell$ must satisfy $$0 = \frac{\partial \ell}{\partial \tau} = -\frac{r}{\tau} + \frac{K}{\tau^2},$$ where $$K = \sum_{i=1}^r t_i + (n-r)t_c,$$ hence $$\hat \tau = \frac{K}{r}.$$
As you should understand by now, the form of the likelihood depends on the structure of the data. Since you did not specify this structure in your question, the only way to proceed is to assume your expression for the likelihood is correct, and allow that to inform the data structure. But we have no way to know what your intended model was.