It turns out to be a novice mistake. I was using matlab and this log is elementwise, as @Ahusain pointed out. We must take the matrix logarithm in Matlab which is denoted by $logm$. Then the calculation becomes:
$$-\text{trace}(\rho \log m (\rho)) = \text{NaN}.$$ The reason is, we have to define $0 \times \log (0)$ as $0$ instead of $\text{NaN}$ which is the default behavior of Matlab. Another way to calculate it is the following:
As this density matrix is representing a pure state, it would have a diagonalization. I.e. it can be written as:
$$\rho = \sum_{j} \lambda_j \lvert \phi_j \rangle \langle \phi_j \lvert$$
Where, $\lambda_j$ are it's eigenvalues and $\lvert \phi_j \rangle$ are it's distinct eigenvectors. In which case, the von Neumann entropy is simply the shannon entropy of it's eigenvalues:
$$S(\rho) = H(\lambda_1, \lambda_2) = -0 \times \log(0) - 1 \times \log(1) = 0$$Using the above definition of $\log(0) = 0$.