Doubt about the domain in logarithmic functions.

According to my book, the logarithmic function

$${\mathrm{log}}_{a}x=y$$

is defined if both x and a are positive and $x\ne 0$ and $a\ne 1$.

So are these not correct?

$${\mathrm{log}}_{-3}9=2$$

$${\mathrm{log}}_{-2}-8=3$$

According to my book, the logarithmic function

$${\mathrm{log}}_{a}x=y$$

is defined if both x and a are positive and $x\ne 0$ and $a\ne 1$.

So are these not correct?

$${\mathrm{log}}_{-3}9=2$$

$${\mathrm{log}}_{-2}-8=3$$