I have studied that the numbers of the form N=aˣ can be written as $\log_aN=x \;\forall N>0, a>0, a\not=1.$
Let's take $N=-8$ and $a=-2$ then $-8=(-2)^3$ and $\log_{(-2)}-8 = 3$.
Why there are restrictions on the number and the base even though $\log_{(-2)}-8 = 3$ is defined? Is there something I'm missing as I'm only learning the propaedeutics of mathematics?