Solving a Logarithmic Equation

log(x+2)+log(x-1)=1

the answers for this is x=-4 , x=3

x=-4 is undefined , however when we combine it

it becomes

log((x+2)(X-1))=1 and substitute x=-4 its defined .

Sense log(x+2)+log(x-1)=log((x+2)(X-1)) why there is a difference??