# logging_event.h

Go to the documentation of this file.

    00001 /* $Id$
    00002  *
    00003  * logging_event.h
    00004  *
    00005  * Copyright 2001-2003, Meiosys (www.meiosys.com). All rights reserved.
    00006  *
    00007  * See the COPYING file for the terms of usage and distribution.
    00008  */
    00009
    00010 #ifndef log4c_logging_event_h
    00011 #define log4c_logging_event_h
    00012
    00023 #include <log4c/defs.h>
    00024 #include <log4c/buffer.h>
    00025 #include <log4c/location_info.h>
    00026 #ifndef _WIN32
    00027 #include <sys/time.h>
    00028 #endif
    00029
    00030 __LOG4C_BEGIN_DECLS
    00031
    00032 struct __log4c_category;
    00033
    00049 typedef struct
    00050 {
    00051     const char* evt_category;
    00052     int evt_priority;
    00053     const char* evt_msg;
    00054     const char* evt_rendered_msg;
    00055     log4c_buffer_t evt_buffer;
    00056 /* ok, this is probably not a good way to do it--should define a common type here
    00057 and have the base acessor function do the mapping
    00058 */
    00059 #ifndef _WIN32
    00060     struct timeval evt_timestamp;
    00061 #else
    00062     FILETIME evt_timestamp;
    00063 #endif
    00064     const log4c_location_info_t* evt_loc;
    00065
    00066 } log4c_logging_event_t;
    00067
    00077 LOG4C_API log4c_logging_event_t* log4c_logging_event_new(
    00078     const char* a_category,
    00079     int         a_priority,
    00080     const char* a_message);
    00085 LOG4C_API void log4c_logging_event_delete(log4c_logging_event_t* a_event);
    00086
    00087 __LOG4C_END_DECLS
    00088
    00089 #endif