logger.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
#ifndef CH_LOGGER_H
00029
#define CH_LOGGER_H
00030
00031
#ifdef __cplusplus
00032
extern "C" {
00033
#endif
00034
00035 typedef void (*
LOGGERFUNCTIONLOG)(
const char *s);
00036
00037
00038 CHIPCARD_API typedef enum {
00039
LoggerTypeConsole,
00040
LoggerTypeFile,
00041
LoggerTypeSyslog,
00042
LoggerTypeFunction
00043 }
LOGGER_LOGTYPE;
00044
00045
00046 CHIPCARD_API typedef enum {
00047
LoggerFacilityAuth=0,
00048
LoggerFacilityDaemon,
00049
LoggerFacilityMail,
00050
LoggerFacilityNews,
00051
LoggerFacilityUser
00052 }
LOGGER_FACILITY;
00053
00054
00055 CHIPCARD_API typedef enum {
00056
LoggerLevelEmergency=0,
00057
LoggerLevelAlert,
00058
LoggerLevelCritical,
00059
LoggerLevelError,
00060
LoggerLevelWarning,
00061
LoggerLevelNotice,
00062
LoggerLevelInfo,
00063
LoggerLevelDebug
00064 }
LOGGER_LEVEL;
00065
00066
00067
00079
CHIPCARD_API int Logger_Open(
const char *ident,
00080
const char *file,
00081 LOGGER_LOGTYPE logtype,
00082 LOGGER_FACILITY facility);
00083
00088
CHIPCARD_API void Logger_Close();
00089
00097
CHIPCARD_API int Logger_Log(LOGGER_LEVEL priority,
const char *s);
00098
00104
CHIPCARD_API void Logger_Enable(
int f);
00105
00111
CHIPCARD_API int Logger_IsEnabled();
00112
00119
CHIPCARD_API void Logger_SetLevel(LOGGER_LEVEL l);
00120
00125
CHIPCARD_API int Logger_GetLevel();
00126
00127
00133
CHIPCARD_API void Logger_SetIdent(
const char *
id);
00134
00135
00141
CHIPCARD_API LOGGERFUNCTIONLOG Logger_SetLogFunction(LOGGERFUNCTIONLOG fn);
00142
00143
#ifdef __cplusplus
00144
}
00145
#endif
00146
00147
00148
#endif
00149
00150
Generated on Wed Jul 28 14:56:49 2004 for libchipcard by
1.3.7