The equation pH = pKa + log is known as the Henderson-Hasselbach equation. In chemistry this equation is often used to prepare buffers in laboratory settings with the availability of weak acids. Weak acids that don't completely disassociate within a solution such as water serve as buffers. The Henderson-Hasselbach equation helps deduce the pH of this buffer solution.
The pH of a solution is a measure of the concentration of the free-floating hydronium ions within the solution. Since weak acids do not disassociate completely, the pH of weak acids is not simply deduced by taking the negative log of the available hydronium ions. The ion dissociation constant of that particular weak acid, commonly known as pKa, is used along with the ratios of the conjugate acid and base within the solution. The pKa is added to the log of conjugate base over conjugate acid to get the overall pH of the solution.
The Henderson-Hasselbach equation takes into account that weak acid does not disassociate completely, requiring the constant pKa along with the log of the conjugate base over the conjugate acid. The conjugate base is identified as losing a proton, while the conjugate acid is identified as gaining a proton. These protons in relation to weak acids come in the form of hydronium ions.