Solution of the wave equation for the logarithmic potential with application to particle spectroscopy