All the books that I’ve read about formal logic either starts assuming the existence of set theory (they talk of countable sets of symbols and define formulae as sequences of symbols), or follow an axiomatic approach that assumes known the meaning of words like symbol, formula, substitution etc. Is there a way to formalize these concepts (with no reference to set theory, I consider set theory a product of formal logic)?
We could assume as primitive the notion of symbol, but could the concepts of string, formula, composition of formulae be rendered in more precise way that don’t rely on intuition? A book or paper reference on this matter would be appreciated.
Regarding the issue with defining strings and such, the most formal published discussions I know of are those I indicated in my answer to Highly Rigorous Logic Book.
In general, you might try googling metalanguage + logic.
I used to struggle with metalogic issues a lot myself, many years ago, and I still struggle a little now when reading some about some foundational topic that makes heavy use of mathematics in the metalanguage (for an example, see my answer to this question).
Here is a silly discussion that might help in thinking about the distinction between metalanguage and object language:
(ADDED A MONTH LATER) I recently came across a book review I have (photocopied about 12 years ago from a library journal volume) of Introduction to Mathematical Logic by Alonzo Church that gives a useful discussion of these logic and metalogic issues. The review is by Martin David Davis and the review appears on pp. 84-86 of Scripta Mathematica 24 (1959). What follows is approximately the first 2/3 of the review, on pp. 84-85.
Although nothing here actually answers the question Alex123 asked, it does provide more context for the question. I suspect the question more properly belongs to philosophy than to mathematics, and I suspect it is discussed in one or more philosophy papers somewhere, but I don't have any specific references to offer at this time.