Fixed bugs with log.cc and made sockets.cc conform to style guide.