Logging

Adds logging functionality to the server program.