This paper presents a new penalty function called logarithmic penalty function (LPF) and examines the convergence of the proposed LPF method. Furthermore, the LaGrange multiplier for equality constrained optimization is derived based on the first-order necessary condition. The proposed LPF belongs to both categories: a classical penalty function and an exact penalty function, depending on the choice of penalty parameter. Moreover, the proposed LPF is capable of dealing with some of the problems with irregular features from Hock-Schittkowski collections of test problems.