Cohn's Measure Theory is good for measure theory. Rudin's Real and Complex Analysis is more standard, but less gentle, in my impression.
Measure theory is good to know, but it's quite different from set theory and logic, and doesn't require you to know them. You don't necessarily have to learn it last, and from my perspective it's easier and you should learn it first. It's certainly the "foundation of some maths" in the sense that it's a fundamental tool in analysis, but most of the time I think people use "foundations of math" to refer just to set theory and logic.
Can you say why you think it should be learned first? The measure theory I have seen seems to always involve sets (measurable functions, sigma-algebras etc), maybe I am just confused about something.
I have recently become interested in the foundations of math. I am interested in tracing the fundamentals of math in a path such as: propositional logic -> first order logic -> set theory -> measure theory. Does anyone have any resources (books, webpages, pdfs etc.) they would like to recommend?
This seems like it would be a popular activity among LWers, so I thought this would be a good place to ask for advice.
My criteria (feel free to post resources which you think others who stumble across this might be interested in):