00001 /* 00002 * Copyright (c) Members of the EGEE Collaboration. 2004. 00003 * See http://eu-egee.org/partners/ for details on the copyright holders. 00004 * For license conditions see the license file or 00005 * http://eu-egee.org/license.html 00006 */ 00007 00008 /* 00009 * Copyright (c) 2001 EU DataGrid. 00010 * For license conditions see http://www.eu-datagrid.org/license.html 00011 * 00012 * Copyright (c) 2001, 2002 by 00013 * Martijn Steenbakkers <martijn@nikhef.nl>, 00014 * David Groep <davidg@nikhef.nl>, 00015 * NIKHEF Amsterdam, the Netherlands 00016 */ 00017 00031 #ifndef LCAS_LOG_H 00032 #define LCAS_LOG_H 00033 00034 /****************************************************************************** 00035 Include header files 00036 ******************************************************************************/ 00037 #include <syslog.h> 00038 00039 /****************************************************************************** 00040 * Module definition 00041 *****************************************************************************/ 00042 /****************************************************************************** 00043 Function: lcas_log() 00044 Description: Log information to file and or syslog 00045 Parameters: 00046 prty: syslog priority (if 0 don't syslog) 00047 fmt: string format 00048 Returns: 0 succes 00049 1 failure 00050 ******************************************************************************/ 00070 extern int lcas_log( 00071 int prty, 00072 char * fmt, 00073 ... 00074 ); 00075 00076 /****************************************************************************** 00077 Function: lcas_log_debug() 00078 Description: Print debugging information 00079 Parameters: 00080 debug_lvl: debugging level 00081 fmt: string format 00082 Returns: 0 succes 00083 1 failure 00084 ******************************************************************************/ 00103 extern int lcas_log_debug( 00104 int debug_lvl, 00105 char * fmt, 00106 ... 00107 ); 00108 00109 /****************************************************************************** 00110 Function: lcas_log_time() 00111 Description: Log information to file and or syslog with a timestamp 00112 Parameters: 00113 prty: syslog priority (if 0 don't syslog) 00114 fmt: string format 00115 Returns: 0 succes 00116 1 failure 00117 ******************************************************************************/ 00137 extern int lcas_log_time( 00138 int prty, 00139 char * fmt, 00140 ... 00141 ); 00142 00143 /****************************************************************************** 00144 Function: lcas_log_a_string() 00145 Description: Log a string according to the passed format to file and or syslog 00146 Parameters: 00147 prty: syslog priority (if 0 don't syslog) 00148 fmt: string format 00149 the_string: the string 00150 Returns: 0 succes 00151 1 failure 00152 ******************************************************************************/ 00172 extern int lcas_log_a_string( 00173 int prty, 00174 char * fmt, 00175 char * the_string 00176 ); 00177 00178 /****************************************************************************** 00179 Function: lcas_log_a_string_debug() 00180 Description: Print debugging information 00181 Parameters: 00182 debug_lvl: debugging level 00183 fmt: string format 00184 the_string: the string 00185 Returns: 0 succes 00186 1 failure 00187 ******************************************************************************/ 00206 extern int lcas_log_a_string_debug( 00207 int debug_lvl, 00208 char * fmt, 00209 char * the_string 00210 ); 00211 00212 /****************************************************************************** 00213 Function: lcas_get_debug_level() 00214 Description: Retrieve the debug_level 00215 Parameters: 00216 Returns: the debug_level 00217 ******************************************************************************/ 00224 extern int lcas_get_debug_level( 00225 ); 00226 00227 #endif /* LCAS_LOG_H */ 00228 00229 /****************************************************************************** 00230 CVS Information: 00231 $Source: /cvs/jra1mw/org.glite.security.lcas-interface/interface/lcas_log.h,v $ 00232 $Date: 2004/12/16 17:03:42 $ 00233 $Revision: 1.3 $ 00234 $Author: msteenba $ 00235 ******************************************************************************/