The server supports logging inherently. If you want the server to print log messages, all you have to do is define the DO_LOG flag and set the LOG_FILE definition to influde a FILE * of the file you want to write the log into (for example setting LOG_FILE to stdout will print the log messages to the standard output).