$\ln|x|$ vs.$\ln(x)$? When is the $\ln$ antiderivative marked as an absolute value? One of the answers to the problems I'm doing had straight lines:
    $$ \ln|y^2-25|$$
versus another problem's just now:
    $$ \ln(1+e^r) $$
I know this is probably to do with the absolute value.  Is the absolute value marking necessary because #1 was the antiderivative of a squared variable expression that could be either positive or negative (and had to be positive because, well, natural log) and the second was positive by default?
Sorry if this is me asking and answering my own question; I'd just love to get confirmation in case I'm wrong.

Just to make explicit what some were saying in the comments, you don't need much sophistication with complex numbers to make sense of this without the absolute value sign. You really only need to know the polar form of complex numbers. We can make use of the fact that we can represent a complex number $a+bi$ as $r e^{i\theta}$, by Euler's formula. The exponential gives a natural definition of $\log$: Given $a+bi=r e^{i\theta}$... $$\log(a+bi)=\log(r e^{i \theta})=\log(e^{\log(r)+i\theta})=\log(r)+i\theta$$
To make this a function in the usual sense, we can restrict $r\ge 0$ and $-\pi\le \theta <\pi$.
Then, $\log(x)$ where $x$ is real is defined as $\log x$ when $x>0$, and $\log |x|-\pi i$ when $x<0$. Differentiating with respect to $x$ in both cases leaves zero imaginary component and the expected result, so then you truly do have $\int \frac{1}{x} dx=\log(x)$.
Also note that when you move from an antiderivative to a definite integral, any constants in your function are subtracted away, so you still don't get a complex result.
