I'm trying to prove that $\begin{pmatrix}-1&1\\0&-1\end{pmatrix}$ which belongs to SL(2,R) can't be written as the exponentiation of a member of sl(2,R). For this I took the more general matrix $\begin{pmatrix}\lambda&1\\0&\lambda\end{pmatrix}$ and did the following
$\begin{pmatrix}\lambda &1\\0&\lambda \end{pmatrix}=\lambda\begin{pmatrix}1 &1/\lambda\\0&1 \end{pmatrix}=\lambda(\mathbf{1}+K)$
log$(\mathbf{1}+K)=K$ (for this $K$ in particular)
$\mathrm{log}(\lambda(\mathbf{1}+K))=\mathrm{log}(\lambda\mathbf{1})+K=\begin{pmatrix}\mathrm{log}(\lambda) &1/\lambda\\0&\mathrm{log}(\lambda) \end{pmatrix}$
For $\lambda=1$ I get the correct result. However, for $\lambda=-1$ (which is the other SL(2,R) matrix of this form) it doesn't seem like I get a traceless matrix. If I take both logs to be on the same complex branch, as in $\begin{pmatrix}i\pi&-1\\0&i\pi\end{pmatrix}$, then this (not traceless) matrix gets exponentiated to what I want. If I take them in different branches, like $\begin{pmatrix}-i\pi&-1\\0&i\pi\end{pmatrix}$, then this (traceless) matrix gets exponentiated to another different thing. ¿What am I doing wrong?