stop logging if server is shutting down