With double precision, I get $\log(\exp(-3)+1)=0.048587351573741958$, which already has $4$ incorrect digits, and $\log(\exp(-30)+1)=9.348... \times10^{-14}$, which only has two correct digits.
What is the most elegant way to circumvent this? I tried a Taylor series of $\log(y)$ around $y=1$, but even with 14 terms I still didn't get all digits correctly for $x=-3$.