Improved debug logging.

Added debug logging to LogSingleton to simplify logging code.