Added unit tests for logging code