The logarithm is not defined at $x=0$, because it tends to $-\infty$ as x tends to 0 from above. But is it nevetheless correct to say that $$ \log_2(0)=-\infty? $$
Or is it better to say/ write $$ \log_2(0)=\lim_{x\downarrow 0}\log_2(x)=-\infty $$
The logarithm is not defined at $x=0$, because it tends to $-\infty$ as x tends to 0 from above. But is it nevetheless correct to say that $$ \log_2(0)=-\infty? $$
Or is it better to say/ write $$ \log_2(0)=\lim_{x\downarrow 0}\log_2(x)=-\infty $$
It is correct to say that $\lim_{x\to 0^+} \log(x) = -\infty$. That is, $\log x$ tends toward $-\infty$ as $x \to 0^+$.
However, $\log(0)$ is not equal to $-\infty$, because, as you say, $\log(x)$ is undefined at $x = 0$.
as you said, it is not defined at 0. But, (here I wave my hand), it is ok to think it is $-\infty$ when you work in limit sense.
You could define an element called $-\infty$ and then define, for example, $\ln: \left [{0..+\infty}\right) \to \mathbb R\cup\{-\infty,+\infty\}$. There are maths that do this, and the codomain is called the "extended reals". But there's no point in doing so here because $-\infty$ wouldn't have the properties of regular numbers in terms of multiplication, subtraction etc. Also, it would be confusing, because you'd be using $\ln$ as a different function than other people. So don't do it.