Move thrift logging init to logger.cpp.
Small style fixes.
Use compiler attributes for unused arguments.
Rename some functions for uniformity.