  Using tools from the theory of Lie groupoids, we study the category of
logarithmic flat connections on principal $G$-bundles, where $G$ is a complex
reductive structure group. Flat connections on the affine line with a
logarithmic singularity at the origin are equivalent to representations of a
groupoid associated to the exponentiated action of $\mathbb{C}$. We show that
such representations admit a canonical Jordan-Chevalley decomposition and use
this to give a functorial classification. Flat connections on a complex
manifold with logarithmic singularities along a hypersurface are equivalent to
representations of a twisted fundamental groupoid. Using a Morita equivalence,
whose construction is inspired by Deligne's notion of paths with tangential
basepoints, we prove a van Kampen type theorem for this groupoid. This allows
us to show that the category of representations of the twisted fundamental
groupoid can be localized to the normal bundle of the hypersurface. As a
result, we obtain a functorial Riemann-Hilbert correspondence for logarithmic
connections in terms of generalized monodromy data.
