1 /* -------------------------------------------------------------------- */ 2 /* SMS Client, send messages to mobile phones and pagers */ 3 /* */ 4 /* logfile/logfile.h */ 5 /* */ 6 /* Copyright (C) 1997,1998,1999 Angelo Masci */ 7 /* */ 8 /* This library is free software; you can redistribute it and/or */ 9 /* modify it under the terms of the GNU Library General Public */ 10 /* License as published by the Free Software Foundation; either */ 11 /* version 2 of the License, or (at your option) any later version. */ 12 /* */ 13 /* This library is distributed in the hope that it will be useful, */ 14 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 15 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */ 16 /* Library General Public License for more details. */ 17 /* */ 18 /* You should have received a copy of the GNU Library General Public */ 19 /* License along with this library; if not, write to the Free */ 20 /* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 21 /* */ 22 /* You can contact the author at this e-mail address: */ 23 /* */ 24 /* angelo@styx.demon.co.uk */ 25 /* */ 26 /* -------------------------------------------------------------------- */ 27 /* $Id$ 28 -------------------------------------------------------------------- */ 29 30 #define LOG_OFF 0 31 #define LOG_ERROR 1 32 #define LOG_WARNING 2 33 #define LOG_STANDARD 3 34 #define LOG_VERBOSE 4 35 #define LOG_VERYVERBOSE 5 36 37 #define MAX_LOG_LINE 4096 38 39 /* -------------------------------------------------------------------- */ 40 41 void open_log(void); 42 void close_log(void); 43 void set_logfile(char *logfile); 44 void set_loglevel(int loglevel); 45 void set_consolelog(int send_to_console_log); 46 47 #if !defined(__GNUC__) 48 void lprintf(int loglevel, const char *fmt, ...); 49 #else 50 void lprintf(int loglevel, const char *fmt, ...) 51 __attribute__ ((format (printf, 2, 3))); 52 #endif 53 54 /* -------------------------------------------------------------------- */ 55 /* -------------------------------------------------------------------- */ 56 57