We report results for the temperature profiles of turbulent Rayleigh-Bénard convection (RBC) in the interior of a cylindrical sample of aspect ratio Γ≡D/L=0.50 (D and L are the diameter and height, respectively). Both in the classical and in the ultimate state of RBC we find that the temperature varies as A×ln (z/L)+B, where z is the distance from the bottom or top plate. In the classical state, the coefficient A decreases in the radial direction as the distance from the side wall increases. For the ultimate state, the radial dependence of A has not yet been determined. These findings are based on experimental measurements over the Rayleigh-number range 4×1012≲Ra≲1015 for a Prandtl number Pr≃0.8 and on direct numerical simulation at Ra=2×1012, 2×1011, and 2×1010, all for Pr=0.7.