log4c  1.2.4
logging_event.h
Go to the documentation of this file.
1 /* $Id: logging_event.h,v 1.13 2013/09/29 17:38:18 valtri Exp $
2  *
3  * logging_event.h
4  *
5  * Copyright 2001-2003, Meiosys (www.meiosys.com). All rights reserved.
6  *
7  * See the COPYING file for the terms of usage and distribution.
8  */
9 
10 #ifndef log4c_logging_event_h
11 #define log4c_logging_event_h
12 
23 #include <log4c/defs.h>
24 #include <log4c/buffer.h>
25 #include <log4c/location_info.h>
26 #if !defined(_WIN32) || defined(__MINGW32__) || defined (__MINGW64__)
27 #include <sys/time.h>
28 #endif
29 
30 __LOG4C_BEGIN_DECLS
31 
32 struct __log4c_category;
33 
49 typedef struct
50 {
51  const char* evt_category;
52  int evt_priority;
53  const char* evt_msg;
54  const char* evt_rendered_msg;
55  log4c_buffer_t evt_buffer;
56 /* ok, this is probably not a good way to do it--should define a common type here
57 and have the base acessor function do the mapping
58 */
59 #if !defined(_WIN32) || defined(__MINGW32__) || defined(__MINGW64__)
60 #define LOG4C_POSIX_TIMESTAMP 1
61  struct timeval evt_timestamp;
62 #else
63  FILETIME evt_timestamp;
64 #endif
65  const log4c_location_info_t* evt_loc;
66 
68 
78 LOG4C_API log4c_logging_event_t* log4c_logging_event_new(
79  const char* a_category,
80  int a_priority,
81  const char* a_message);
86 LOG4C_API void log4c_logging_event_delete(log4c_logging_event_t* a_event);
87 
88 __LOG4C_END_DECLS
89 
90 #endif