TITLE: Book on the Rigorous Foundations of Mathematics- Logic and Set Theory
QUESTION [36 upvotes]: I am asking for a book that develops the foundations of mathematics, up to the basic analysis (functions, real numbers etc.) in a very rigorous way, similar to Hilbert's program.  Having read this question: " Where to begin with foundations of mathematics" 
I understand that this book must have:

Propositional Logic
First Order-Predicate Logic
Set Theory 

Logic however must not depend on set theory! I have tried reading many pdf notes on the first two but have been dissapointed by the usage of notions and concepts from Set Theory.
So what do I want? A book that builds up these $3$ from ground $0$ and develops the foundations of mathematics up to the Axioms of ZFC and simple consequences like the existence of the real number field. As such, it is not neccessary for this book to contain the incompleteness theorems, cardinality etc. It must however be rigorous and formal in the sense that when I finish it, I have no doubt that the foundations are "solid". 
Final notes: It would be preferable if it were made for self study (but that's not neccessary). You can also suggest up to 3 books that discuss the topics above, beware however as circular definitions must be avoided. Rigor in other words, is the most important thing I am asking for.
PS: There have been other questions here on the foundations of logic as this one. They do not answer my question however, as rigor is not (over)emphasised. I believe this is not a duplicate and I hope you see that as well.
Thank you in advance

REPLY [3 votes]: I precisely had this purpose of building the foundations of mathematics (logic and set theory) from ground 0 with absolute rigor (I mean, as much rigor as actually possible) with my site settheory.net.
There I start by building set theory and logic in parallel.
I only break the chain of maximum rigor in the developments of model theory in Part 3, where I introduce and explain things more intuitively, not so rigorously. However I also have plans to bring rigorous foundations for these things, through the part on Galois connections, that you can see done and stands as a logical continuation of Part 2. There as you can see, I reached the concept of well-founded relation. This concept can be used to rigorously define the structure of formal expressions with their interpretations.