/********************************************************************** * vanessa_logger_sample.c September 2000 * Horms horms@verge.net.au * * vanessa_logger * Generic logging layer * Copyright (C) 2000-2004 Horms * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * **********************************************************************/ #include #include #include #include #include "vanessa_logger_sample_config.h" #define MIN_UID 100 static void log_function(int priority, const char *format, va_list ap) { vfprintf(stderr, format, ap); } /********************************************************************** * Muriel the main function **********************************************************************/ int main (int argc, char **argv){ vanessa_logger_t *log_fh=NULL; vanessa_logger_t *log_fn=NULL; vanessa_logger_t *log_sl=NULL; vanessa_logger_t *log_sl_bn=NULL; vanessa_logger_t *log_fu=NULL; printf("vanessa_logger_sample version %s Copyright Horms\n", VERSION); /* * Make sure this is _not_ being run by a privileged user * * This programme is not suitable to be run by privileged users * as the filename logger that is opened opens a file * in the PWD. If vanessa logger is used in a programme * designed to be used by a privileged user then a full * pathname should be given to vanessa_logger_openlog_filename() */ if(getuid()