A logarithmic regularity criterion for the 3D generalized MHD system