In 1975, Don Zagier obtained a new version of the Kronecker limit formula for a real quadratic field which involved an interesting function F(x) which is now known as the Herglotz function. As demonstrated by Zagier, and very recently by Radchenko and Zagier, F(x) satisfies beautiful properties which are of interest in both algebraic number theory as well as in analytic number theory. In this paper, we study Fk,N(x), an extension of the Herglotz function which also subsumes higher Herglotz function of Vlasenko and Zagier. We call it the extended higher Herglotz function. It is intimately connected with a certain generalized Lambert series as well as with a generalized cotangent Dirichlet series inspired from Krätzel's work. We derive two different kinds of functional equations satisfied by Fk,N(x). Radchenko and Zagier gave a beautiful relation between the integral ∫01log(1+tx)1+tdt and F(x) and used it to evaluate this integral at various rational as well as irrational arguments. We obtain a relation between Fk,N(x) and a generalization of the above integral involving polylogarithm. The asymptotic expansions of Fk,N(x) and some generalized Lambert series are also obtained along with other supplementary results.