5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher Stephen Gallagher <sgallagh@redhat.com>
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher Copyright (C) 2010 Red Hat
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher This program is free software; you can redistribute it and/or modify
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher it under the terms of the GNU General Public License as published by
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher the Free Software Foundation; either version 3 of the License, or
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher (at your option) any later version.
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher This program is distributed in the hope that it will be useful,
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher but WITHOUT ANY WARRANTY; without even the implied warranty of
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher GNU General Public License for more details.
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher You should have received a copy of the GNU General Public License
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher along with this program. If not, see <http://www.gnu.org/licenses/>.
77c0d1f6074059dafd2293f9c42ea0f9d60f8aadJakub Hrozek#else /* WITH_JOURNALD */
77c0d1f6074059dafd2293f9c42ea0f9d60f8aadJakub Hrozek#endif /* WITH_JOURNALD */
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher /* If we've been passed an invalid priority, it's
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher * best to assume it's an emergency.
cbc005cd63523ca7d772c9f0c7ea9a4817c2c07eSumit Bosestatic void sss_log_internal(int priority, int facility, const char *format,
588f8fbe74e66cc015f185a5b798173d320a65b5Yassir Elleyvoid sss_log(int priority, const char *format, ...)
cbc005cd63523ca7d772c9f0c7ea9a4817c2c07eSumit Bose sss_log_internal(priority, LOG_DAEMON, format, ap);
588f8fbe74e66cc015f185a5b798173d320a65b5Yassir Elleyvoid sss_log_ext(int priority, int facility, const char *format, ...)
cbc005cd63523ca7d772c9f0c7ea9a4817c2c07eSumit Bose sss_log_internal(priority, facility, format, ap);
cbc005cd63523ca7d772c9f0c7ea9a4817c2c07eSumit Bosestatic void sss_log_internal(int priority, int facility, const char *format,
77c0d1f6074059dafd2293f9c42ea0f9d60f8aadJakub Hrozek /* ENOMEM */
77c0d1f6074059dafd2293f9c42ea0f9d60f8aadJakub Hrozek#else /* WITH_JOURNALD */
cbc005cd63523ca7d772c9f0c7ea9a4817c2c07eSumit Bosestatic void sss_log_internal(int priority, int facility, const char *format,
5c705137ea853613318a29f0cd760688ab4daef3Stephen Gallagher syslog_priority = sss_to_syslog(priority);
77c0d1f6074059dafd2293f9c42ea0f9d60f8aadJakub Hrozek#endif /* WITH_JOURNALD */