  Large deviation functions are an essential tool in the statistics of rare
events. Often they can be obtained by contraction from a so-called level 2
large deviation {\em functional} characterizing the empirical density of the
underlying stochastic process. For Langevin systems obeying detailed balance,
the explicit form of this functional has been known ever since the mathematical
work of Donsker and Varadhan. We rederive the Donsker-Varadhan result by using
stochastic path-integrals and then generalize it to situations without detailed
balance including non-equilibrium steady states. The proper incorporation of
the empirical probability flux turns out to be crucial. We elucidate the
relation between the large deviation functional and different notions of
entropy production in stochastic thermodynamics and discuss some aspects of the
ensuing contractions. Finally, we illustrate our findings with examples.
