Allow logging to be enabled by environment variable.