Disable all logging if production mode is enabled (#12299)

Change-Id: Ia6b05c0ebaf1f0bb4fb675392cc8f634cab8e494