You can take the log of a negative number,
but your answer is no longer "real", but complex.
A logarithm is the inverse of a power.
If , then .
is always positive. As a result, you can only take the log of a positive number.
However, 10 raised to an imaginary number can be negative, so the log of a negative number is imaginary.
So long as you use restrict your domain to real numbers, the log of a negative number is undefined.