Classical electron-ion scattering in strongly magnetized plasmas. I. A generalized Coulomb logarithm