Purpose and subject matter of logic are the same question.
Nazar, Fikr and the Definition of Logic