1 /* GNU Mailutils -- a suite of utilities for electronic mail 2 Copyright (C) 2007-2021 Free Software Foundation, Inc. 3 4 This library is free software; you can redistribute it and/or 5 modify it under the terms of the GNU Lesser General Public 6 License as published by the Free Software Foundation; either 7 version 3 of the License, or (at your option) any later version. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General 15 Public License along with this library. If not, see 16 <http://www.gnu.org/licenses/>. */ 17 18 #ifndef _MAILUTILS_SYSLOG_H 19 #define _MAILUTILS_SYSLOG_H 20 21 #include <syslog.h> 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 extern int mu_log_syslog; 28 extern int mu_log_facility; 29 extern char *mu_log_tag; 30 extern int mu_log_print_severity; 31 extern unsigned mu_log_severity_threshold; 32 extern int mu_log_session_id; 33 34 #define MU_LOG_TAG() (mu_log_tag ? mu_log_tag : mu_program_name) 35 36 int mu_string_to_syslog_facility (const char *str, int *pfacility); 37 const char *mu_syslog_facility_to_string (int n); 38 int mu_string_to_syslog_priority (const char *str, int *pprio); 39 const char *mu_syslog_priority_to_string (int n); 40 41 #ifdef __cplusplus 42 } 43 #endif 44 45 #endif 46 47 48