TITLE: Reference of the connection of category theory and logic(foundation of mathematics)
QUESTION [6 upvotes]: I am searching for help on finding some books or papers that I can read to see the connections between category theory and foundation of mathematics.
My background of category theory is:
Leinster's textbook (and I also use Awodey's book sometimes)
My background of foundation of mathematics is:
I took a course of mathematical logic and get some knowledge of set-theory, model theory, propositional and first order logic, natural deduction. etc. Currently learning modal logic.
Any help, please? Many thanks if someone could give some suggestions regarding my background. But any reference are good and if the things you mention is too advanced. I would try to read it later.
EDIT: As hinted by the comment, for you experts to recommond suitable books maybe I should mention my algebra background as well: some group theory, ring theory, field theory and Galois theory, algebraic topology (first three chapters of Hatcher) and some functor-of-point approch algebraic geometry.

REPLY [2 votes]: Let me add a couple of different suggestions. If you want a more discursive overview of how category theory relates to some traditional issues in the foundations of mathematics, the following might well be of interest:

Ralf Krömer, Tool and Object: A History and Philosophy of Category Theory (Birkaüser, 2007)
Jean-Pierre Marquis, From a Geometrical Point of View: Study of the History and Philosophy of Category Theory (Springer, 2009).

Other categorical resources (this time freely available online, and including four handbook essays on categorical logic if your interest goes in that direction) are mentioned on this Category Theory webpage.