The above relation really only approximately. If you consider arithmetic retunrs then it is exact.
For the approximation you just need to look at the Taylor series of the exponential:
$$
e^x = 1 + x + \text{ terms of higher order}.
$$
These terms of higher order ($x^2$ and $x^3$) become small if $x$ is much smaller than one - which holds true for returns.
Thus
$$
\sum_i w_i e^{r_i} \approx \sum_i w_i ( 1+ r_i) = 1 + \sum_i w_i r_i,
$$
if $\sum_i w_i = 1$.
Then conside that $\ln(1+x) \approx x$ (you can check here) and you are done:
$$
\ln \left(1 + \sum_i w_i r_i \right) \approx \sum_i w_i r_i.
$$