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×10(12)≲Ra≲10(15) for a Prandtl number Pr≃0.8 and on direct numerical simulation at Ra=2×10(12), 2×10(11), and 2×10(10), all for Pr=0.7.