$$\DeclareMathOperator{\tr}{\operatorname{tr}} \tr(\log A) = \log \det A$$
because of its well-known identity. Importantly, it is easier for a computer to find the log determinant than to compute the matrix logarithm.
I want to rewrite $\tr(B \log A)$ in the same way. We apply the power rule the same way as for scalars to get $\tr(\log A^B)$. Then, we use the well-known identity to get $\log \det A^B$.
I need help completing this solution. In its current state, I still need to compute the matrix logarithm to evaluate it.
If you could compute $\DeclareMathOperator{\tr}{\operatorname{tr}}\tr(B \log A)$ easily for $n \times n$ matrices, you could use it to compute $\log A$. Namely, if $E_{ij}$ is the $n \times n$ matrix with $1$ in position $(i,j)$ and $0$ elsewhere, and $M = (m_{ij})$ is any $n \times n$ matrix, $\tr(E_{ij} M) = m_{ji}$.