00001 #ifndef foodaemonloghfoo 00002 #define foodaemonloghfoo 00003 00004 /* $Id: dlog.h 71 2004-12-18 23:29:50Z lennart $ */ 00005 00006 /* 00007 * This file is part of libdaemon. 00008 * 00009 * libdaemon is free software; you can redistribute it and/or modify it 00010 * under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * libdaemon is distributed in the hope that it will be useful, but 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with libdaemon; if not, write to the Free Software Foundation, 00021 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00022 */ 00023 00024 #include <syslog.h> 00025 00026 #ifdef __cplusplus 00027 extern "C" { 00028 #endif 00029 00037 enum daemon_log_flags { 00038 DAEMON_LOG_SYSLOG = 1, 00039 DAEMON_LOG_STDERR = 2, 00040 DAEMON_LOG_STDOUT = 4, 00041 DAEMON_LOG_AUTO = 8 00044 }; 00045 00047 extern enum daemon_log_flags daemon_log_use; 00048 00051 extern char* daemon_log_ident; 00052 00057 void daemon_log(int prio, const char* t, ...); 00058 00065 char *daemon_ident_from_argv0(char *argv0); 00066 00067 #ifdef __cplusplus 00068 } 00069 #endif 00070 00071 #endif