Update logging based on flags