The distribution of the logarithm in an orthogonal and a symplectic family of $L$-functions