Yes, Shannon explicitly stated in Mathematical Theory of Communication that the general form was the same as that in statistical mechanics:
"The form of H will be recognized as that of entropy as defined in certain formulations of statistical mechanics where p_i is the probability of a system being in cell i of its phase space. H is then, for example, the H in Boltzmann’s famous H theorem."
where the general form was H = -K\sum p_i * log(p_i)
IIRC, this form is the only kind with the following two properties:
- chain rule -- H(X,Y) = H(X) + H(Y|X)
- maximized for the uniform distribution.