"Logic" is a part of mathematics as well as it is a part of philosophy!
Now, the explanation. I suppose you are well aware of the fact that a term "logic", as more or less any term, can be interpreted differently by any person. But let's put aside the "non-canonical" interpretations...
The term "logic" has an uncertain origin. The Greeks say it was Parmenides (5th century bce) who coined the term. What's certain is that the first system of logic (namely the syllogistic logic, the logic of classes and categories) comes from Aristotle, who was certainly a philosopher, but he was also involved in natural sciences to which he applied his system (i.e. his zoological systematization).
Then were the stoics, who invented the sentential calculus, which, much later, was discovered by mathematicians to be well suited for their metamathematics.
The so called "traditional logic" was certainly considered a part of philosophy.
I'd say that our "philosophy or mathematics" dillema started when George Boole introduced his algebra. It meant that from that moment on logic can not only evaluate mathematical problems, but also can be interpreted in it.
Of course I have to skip many significant breakthroughs and theorems that strenghtened the position of logic in mathematics, I'll just mention here: Hilbert, who wanted to build the whole mathematics solely on logical axioms; Goedel, who proved Hilbert wrong; Tarski, who developed many metalogical guidelines that are well-respected to this day.
The real question here is not: "Is mathematics deducible from logic?", but: "What are the differences between (pure) logic and mathematics?". I'd say that the definitions of terms: "logic", "mathematics", "philosophy" are always the results of some conventions and so cannot be understood unambiguously without more context.