Set net_log to NULL unless debugging.

This way methods can exit early instead of logging by testing if the net_log is NULL.

Change-Id: I49e91460967ba3edad7d7b894a90df0589e8ccb2