This difficulty in the definition of the logarithm arises due to
the way exponentiation works.
If we allow solutions only in real numbers, not complex numbers,
it is possible to define some non-integer powers of negative numbers.
Specifically, the rule is,
For any real number $a$, for any integers $m$ and $n$ such that $n>1$ and $m$ and $n$ have no common factor, if $\sqrt[n]a$ is a real number then $$a^{m/n} = \left(\sqrt[n]a\right)^m.$$
You'll find this rule, or rules that imply it, in various places,
including
here,
here,
the Wikipedia page on Exponentiation,
or any number of high-school algebra textbooks.
This rule depends on the assumption that we know when $\sqrt[n]a$ is defined
(for an integer $n$) and what it is when it is defined. When $n$ is odd,
$\sqrt[n]a$ is the unique real number $x$ such that $x^n = a$.
But when $n$ is even, $\sqrt[n]a$ is defined only when $a \geq 0$,
and it is defined then as the unique non-negative real number $x$
such that $x^n = a$.
We cannot define $(-4)^{1/2}$ in real numbers, because there is no
real number $x$ such that $x^2 = -4$. There is not even a real number $x$
whose square is close to $-4$; all the squares of real numbers are
zero or positive.
Now consider irrational exponents. We can define irrational powers of
real numbers by assuming $a^x$ is a continuous function of $x$ when
$a$ is positive. We can do this because the rational powers of
positive real numbers "fit the curve" of a continuous function;
if $p_1, p_2, p_3, \ldots$ is any sequence of rational numbers
converging to a certain rational number $p$, then
$2^{p_1}, 2^{p_2}, 2^{p_3}, \ldots$ is a sequence of real numbers
converging to $2^p$.
To extend this to irrational exponents, we define $2^\pi$ (for example)
as the limit of $2^{p_1}, 2^{p_2}, 2^{p_3}, \ldots$
where $p_1, p_2, p_3, \ldots$ converges to $\pi$;
and if for every sequence of rational numbers $q_1, q_2, q_3, \ldots$
that converges to a certain real number $r$,
the powers $2^{q_1}, 2^{q_2}, 2^{q_3}, \ldots$
converge to $5$, then we say that $2^r = 5$.
This works fine for defining $\log_2 5$, because there is a unique
real number $r$ such that for every rational sequence $q_1, q_2, q_3, \ldots$
that converges to $r$, the sequence $2^{q_1}, 2^{q_2}, 2^{q_3}, \ldots$
converge to $5$. It does not work for $\log_{-2} (-5)$, however.
The problem with $\log_{-2} (-5)$ (in particular, the reason it is not
equal to $\log_2 5$) is that in any sequence of rational numbers
$q_1, q_2, q_3, \ldots$ that converges to $\log_2 5$,
it is possible that when reduced to lowest terms ($m/n$ where $m$ and $n$
have no common factor), the numerator of each $q_i$ might be positive
or it might be negative.
We can easily make a sequence where all the numerators are odd,
in which case $(-2)^{q_1}, (-2)^{q_2}, (-2)^{q_3}, \ldots$ converges to $-5$,
or a sequence where all the numerators are even,
in which case $(-2)^{q_1}, (-2)^{q_2}, (-2)^{q_3}, \ldots$ converges to $5$,
or a sequence in which the numerators alternate between odd and even,
so $(-2)^{q_1}, (-2)^{q_2}, (-2)^{q_3}, \ldots$ alternates between
$5$ and $-5$ and does not converge to anything.
In short, it's really not justifiable to say that
$(-2)^{\log_2 5} = -5$.
There isn't a really good reason to say $(-2)^{\log_2 5}$ is a
real number at all.
Nor is there any better candidate to be the real number $x$ that solves
the equation $(-2)^x = -5$.
That leaves us without a good way to define $\log_{-2}(-5)$,
nor the log base $-2$ of most other numbers.
We end up not being able to use log base $-2$ for just about any of the
things we find logarithms really useful for, so we don't even try to
define it for the cases where it might possibly make sense.