This answers quite a bit more than you asked, but hopefully it is useful in understand how logarithms of things that aren't positive reals can be defined and why it's not so simple.
Logarithms of complex numbers are a bit murky. To see why, let's look at a reasonable definition of a logarithm:
Define $y=\ln x$ so that $e^y=x$.
If you try to think of $\ln$ as a function that maps reals to reals, it should be pretty clear why you can only take logarithms of positive numbers, since $e^y>0$ for all real $y$.
However, once we start talking about logarithms in the complex plane, things get pretty messy. The first problem we encounter is something like
$$e^0=e^{2\pi i}=1.$$
So, judging by our definition, $\ln 1$ should be both $0$ and $2\pi i$, and in fact should be $2n\pi i$ for every integer $n$. In fact, since $e^{a+b}=e^ae^b$ is still a valid rule for complex exponentials, we have that
$$y\text{ is a valid value of }\ln x \Leftrightarrow y+2\pi i\text{ is a valid value of }\ln x,$$
where we're using our definition above. One can show that, in fact, for every complex $x\neq 0$ there exists some $y$ so that $e^y=x$, and that any two such $y$ differ by an integer multiple of $2\pi i$.
How do we get around this? The standard way is to just pick your $y$ so the imaginary part is in a desired interval; this interval is usually $[0,2\pi i)$ or $(-\pi i,\pi i]$. This works if our only goal is to define a function, but we end up with nasty discontinuity issues. In sum, this works for some things and doesn't for others.
We also end up being led astray by examples such as $i^i$. Firstly, complex exponentiation is usually defined by the rule
$$a^b=e^{b\ln a},$$
where we make some assumption that $\ln a$ is well-defined. This gets us into issues like the one you described; on one hand,
$$i^i=e^{i\ln i}=e^{i\frac{i\pi}{2}}=e^{-\frac{\pi}{2}},$$
and on another,
$$i^i=e^{i\ln i}=e^{i\frac{5i\pi}{2}}=e^{-\frac{5\pi}{2}}.$$
This seems bad, and mathematicians usually take great care to avoid these sorts of issues when dealing with complex exponentials.
In sum, the moral answer to your question is something like:
Logarithms of numbers that are not positive reals can be defined, but we have to give up some nice properties due to these logarithms having multiple values. In particular, complex exponentiation runs into some annoying problems.
Side note: complex exponentials and logarithms are usually formally defined using power series, I believe.