Let:
$f(x) = \log(x) + \log(y)$ and $g(x) = \log(xy)$
As we know: $\log(xy) = \log(x) + \log(y)$, so I figure that $f(x) = f(g)$
The domain of $f(x)$ is : $x>0$ and $y>0$.
And the domain of $g(x)$ is: $x>0$ and $y>0$ or $x<0$ and $y<0$.
Why are the two domains different ?
Your statement "$\log(xy)=\log x+\log y$" is incomplete. It should be
Therefore your functions $f$ and $g$ have equal values whenever $x,y>0$. However this says nothing at all about the functions - whether they are defined, undefined, equal, unequal - for other values of $x$ and $y$. So there is no reason at all why one of the functions cannot have a larger domain than the other.