What is the unit of pH?
The real definition of the $\text{pH}$ is not in terms of concentration but in terms of the activity of a proton,

\begin{equation}
  \text{pH} = - \log a_{\ce{H+}} \ ,
\end{equation}

and the activity is a dimensionless quantity. You can think of the activity as a generalization of the mole fraction that takes into account deviations from the ideal behaviour in real solutions.
By introducing the (dimensionless) activity coefficient $\gamma_{\ce{H+}}$, which represents the effect of the deviations from the ideal behaviour on the concentration, you can link the activity to the concentration via

\begin{equation}
  a_{\ce{H+}} = \frac{\gamma_{\ce{H+}} c_{\ce{H+}}}{c^0} \ ,
\end{equation}

where $c^0$ is the standard concentration of $1 \, \text{mol}/\text{L}$.
If you ignore the non-ideal contributions you can approximately express the $\text{pH}$ in terms of the normalized proton concentration

\begin{equation}
  \text{pH} \approx - \log \frac{c_{\ce{H+}}}{c^0} \ .
\end{equation}

In general, there can be no logarithm of a quantity bearing a unit. If however you encounter such a case it is usually due to sloppy notation: either the argument of the logarithm is implicitly understood to be normalized and thus becomes unitless or the units in the logarithm's argument originate from using the mathematical properties of logarithms to divide the logarithm of a product which is by itself unitless into a sum of logarithms: $\log(a \cdot b) = \log(a) + \log(b)$.