Is
\[f(x) = \log (x + \sqrt{1 + x^2})\]an even function, odd function, or neither?

Enter "odd", "even", or "neither".
Note that
\begin{align*}
-x + \sqrt{1 + (-x)^2} &= -x + \sqrt{1 + x^2} \\
&= \frac{(-x + \sqrt{1 + x^2})(x + \sqrt{1 + x^2})}{x + \sqrt{1 + x^2}} \\
&= \frac{-x^2 + (1 + x^2)}{x + \sqrt{1 + x^2}} \\
&= \frac{1}{x + \sqrt{1 + x^2}},
\end{align*}so
\begin{align*}
f(-x) &= \log (-x + \sqrt{1 + x^2}) \\
&= \log \left( \frac{1}{x + \sqrt{1 + x^2}} \right) \\
&= -\log (x + \sqrt{1 + x^2}) \\
&= -f(x).
\end{align*}Thus, $f(x)$ is an $\boxed{\text{odd}}$ function.