added enable/disable to log metrics.