I'm reading a book on mathematical logic by Ebbinghaus, Flum and Thomas. It turns out that set theory is used to build formal languages. I mean, one begins with the definition of an alphabet, which is just a non-empty set $\mathcal{A}$. So actually, I imagine that one starts with two primitive notions: set and member.
My confusion is the following: if we are trying to construct all the logical symbols ($\forall, \exists, \wedge$, etc.) as just elements of an alphabet, we therefore can not use logic to build logic; if we are working with sets, the ZF axioms use logic ('there is a set $z$ such that $x\notin z$ for all sets $x$'); so how does one begin? Maybe I'm confusing myself. I'll try harder:
If I want to build languages and logic and start by the primitive notions of set and member, then for example I need the axiom of empty set which uses logic (?), because otherwise what are symbols? what are strings (which are in fact sequences and therefore we need $\mathbb{N}$, so we need the empty set, so we need the axiom and we need logic)? Well maybe we don't need $\mathbb{N}$ since we are concern with finite sequences, so we just need the definition of tuple. Still, we need the empty set.
Maybe it is not possible to construct mathematical logic, I don't know. It seems that there are always terms that have not been defined, or perhaps cannot be defined.
If I have not made myself clear, please let me know.