Reoraganized logging subsystem. Refactored log_Message, improved it to
handle a few edge cases correctly.