Usually logic is considered part of mathematics. However, in an important sense, logic precedes mathematics. You can't do mathematics without using logic.
Many have, take the sort of mathematics done in order to understand physics. Logic is the study of formal reasoning. Mathematics is the study of form and structure. It took R&W's Principia Mathematica to attempt to show that the entirety of mathematics was rested on a logical foundation. That's pretty recent on the scene if you think about the history of mathematics! To me, the idea you expressed, seems like a very 20th century thing.