fixed npe in logger.
Merge pull request #4 from scopely/bugs/log-npe

fixed npe in logger.