Well, you can probably get the best answer for your purposes simply by googling. There is an entire branch of philosophy called "philosophy of law," which runs from Plato to Grotius and Hobbes to Dworkin and Rawls. Many texts and anthologies are devoted to the subject
It is closely related to philosophy of political science and ethics, as you note. I would not say it is related to "logic" per se, especially not modern logic, but more to argumentation and rhetoric, as developed by the Sophists. The philosophy of religion is also somewhat related, in that most monotheistic religions have foundational "law givers," such as Moses or Mohammed or, to stretch the point, "We the People."
As an aside, I would note that philosophy itself could be described historically as a "branch" of law, or at least as a descendent of the forms of competitive, public argumentation developed earlier in the law courts of the Greek polis and other "political" assemblies of government. Socrates, like Jesus, came to his finale in a law court.
And I would add that in terms of crucial shifts in the modern age, both Kant and Hegel are very important here for developing the modern complexities of self-imposed human "laws" and the discovery of human "freedom." The literature is vast, so any number of overview texts might be a good starting point.