In both Volta potential and Nernst potential equations, besides some constants, temperature and valence parameters, the potential is a function of the logarithm of the ratio of two densities (or concentrations).
I have a problem understanding why a logarithm. In the ideal gas law, pressure difference is linearly proportional to the number of moles, so a differential (e.g. transmembrane) pressure is linearly proportional to the substraction of the two compartments number of moles, not a log of their ratio. So this must have to do, I guess, with the fundamental difference between a voltage and a pressure. A voltage is joule per coulomb, a pressure is (among other SI definitions) joule per cubic meter. Since coulomb force adds another pressure of some kind on top of the motion of particles and it has a longer range than collisions, this could be why.
I could understand a log as the integration of a series of divisions, and that would fit with a $1/r$ interaction potential decaying with distance. Yet, the log in said potentials equations is applied to a ratio.