00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AWHANDLER_LOG__
00023 #define __AWHANDLER_LOG__
00024
00025 #include <stdio.h>
00026
00027 #include "monitor.h"
00028
00029 #include "wire.h"
00030
00084
00085
00086
00087
00088
00092 typedef struct {
00093
00094 aw_handler_t
00095 handler_header;
00096
00097 u_int32_t
00098 max_line_len;
00099
00100 byte_t
00101 *line;
00102
00103 byte_t
00104 *format;
00105
00106 byte_t
00107 *desc;
00108
00109 int32_t
00110 loglevel;
00111
00112 aw_logger_t
00113 *logger;
00114
00115 } aw_loghandler_t;
00116
00131 aw_loghandler_t *aw_create_loghandler(aw_logger_t *logger,
00132 const byte_t *desc,
00133 int32_t loglevel,
00134 const byte_t *format,
00135 u_int32_t max_line_len,
00136 u_int32_t tasklet,
00137 int32_t (*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00138 int32_t (*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
00139 const aw_alarm_sched_t *sched,
00140 aw_logger_t *aware_logger);
00141
00142
00147 void aw_free_loghandler(aw_loghandler_t *h);
00148
00149
00153 aw_handler_t *aw_wire_loghandler(aw_wire_mkhandler_args_t *args);
00154
00155
00156 #endif
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167