Foundations of Logical Consequence