File: application_3.h

package info (click to toggle)
log4c 1.2.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: sh: 11,246; ansic: 8,645; makefile: 682; lex: 134; cpp: 6
file content (34 lines) | stat: -rw-r--r-- 804 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

typedef struct {
	char* hostname;
	int   pid;
} user_locinfo_t;

#define log4c_category_log_userinfo(a_category, a_void, a_priority, a_format, args...) \
  helper(a_category, __FILE__, __LINE__, __FUNCTION__, a_void, a_priority, a_format , ## args );

LOG4C_ATTRIBUTE((format(printf, 7, 8)))
static inline void helper(
    const log4c_category_t* a_category,
    char* file,
    int   line,
    const char* func,
    void* user_locinfo,
    int a_priority,
    const char* a_format,
    ...)
{
  log4c_location_info_t locinfo;
  locinfo.loc_file = file;
  locinfo.loc_line = line;
  locinfo.loc_function = func;
  locinfo.loc_data = user_locinfo;
        va_list va;
	        va_start(va, a_format);

  log4c_category_log_locinfo(a_category, &locinfo, a_priority, a_format,va);
       va_end(va);

}