Changed how the server accesses the main thread for writing log entries.