40
40
41
41
/* used internally by the log interface */
42
42
typedef void (* log_print_pre_fmt_f )(log_print_f gen_print_func , int log_level ,
43
- int facility , char * module , const char * func ,
43
+ int facility , const char * module , const char * func ,
44
44
char * stderr_plain_fmt , char * syslog_plain_fmt , char * format , va_list ap );
45
45
46
46
struct log_consumer_t {
@@ -72,16 +72,16 @@ int log_msg_buf_size = 4096;
72
72
73
73
str log_cee_hostname ;
74
74
75
- static void stderr_dprint (int log_level , int facility , char * module , const char * func ,
75
+ static void stderr_dprint (int log_level , int facility , const char * module , const char * func ,
76
76
char * format , va_list ap );
77
- static void syslog_dprint (int log_level , int facility , char * module , const char * func ,
77
+ static void syslog_dprint (int log_level , int facility , const char * module , const char * func ,
78
78
char * format , va_list ap );
79
79
80
80
static void stderr_pre_fmt_func (log_print_f gen_print_func , int log_level ,
81
- int facility , char * module , const char * func ,
81
+ int facility , const char * module , const char * func ,
82
82
char * stderr_plain_fmt , char * syslog_plain_fmt , char * format , va_list ap );
83
83
static void syslog_pre_fmt_func (log_print_f gen_print_func , int log_level ,
84
- int facility , char * module , const char * func ,
84
+ int facility , const char * module , const char * func ,
85
85
char * stderr_plain_fmt , char * syslog_plain_fmt , char * format , va_list ap );
86
86
87
87
/* static consumer table to be used until a shm one is alloc'ed;
@@ -311,7 +311,7 @@ enum log_json_format {
311
311
};
312
312
313
313
static int log_print_json (str * buf , enum log_json_format json_fmt , char * time ,
314
- int pid , char * prefix , char * level , char * module , const char * func ,
314
+ int pid , char * prefix , const char * level , const char * module , const char * func ,
315
315
char * format , va_list ap )
316
316
{
317
317
char * p , * tmp ;
@@ -454,7 +454,7 @@ static int log_print_json(str *buf, enum log_json_format json_fmt, char *time,
454
454
return len ;
455
455
}
456
456
457
- static void stderr_dprint (int log_level , int facility , char * module , const char * func ,
457
+ static void stderr_dprint (int log_level , int facility , const char * module , const char * func ,
458
458
char * format , va_list ap )
459
459
{
460
460
char * time ;
@@ -486,7 +486,7 @@ static void stderr_dprint(int log_level, int facility, char *module, const char
486
486
}
487
487
}
488
488
489
- static void syslog_dprint (int log_level , int facility , char * module , const char * func ,
489
+ static void syslog_dprint (int log_level , int facility , const char * module , const char * func ,
490
490
char * format , va_list ap )
491
491
{
492
492
int level ;
@@ -553,7 +553,7 @@ static str evi_func_str = str_init("function");
553
553
static str evi_prefix_str = str_init ("prefix" );
554
554
static str evi_msg_str = str_init ("message" );
555
555
556
- static void event_dprint (int level , int facility , char * module , const char * func ,
556
+ static void event_dprint (int level , int facility , const char * module , const char * func ,
557
557
char * format , va_list ap )
558
558
{
559
559
evi_params_p list = NULL ;
@@ -652,7 +652,7 @@ static void event_dprint(int level, int facility, char *module, const char *func
652
652
653
653
/* generic consumer that registers to the log interface */
654
654
static void gen_consumer_pre_fmt_func (log_print_f gen_print_func , int log_level ,
655
- int facility , char * module , const char * func ,
655
+ int facility , const char * module , const char * func ,
656
656
char * stderr_plain_fmt , char * syslog_plain_fmt , char * format , va_list ap )
657
657
{
658
658
/* skip the time, pid, prefix and function arguments from va_list */
@@ -666,7 +666,7 @@ static void gen_consumer_pre_fmt_func(log_print_f gen_print_func, int log_level,
666
666
}
667
667
668
668
static void stderr_pre_fmt_func (log_print_f gen_print_func , int log_level ,
669
- int facility , char * module , const char * func ,
669
+ int facility , const char * module , const char * func ,
670
670
char * stderr_plain_fmt , char * syslog_plain_fmt , char * format , va_list ap )
671
671
{
672
672
char * fmt = stderr_log_format == LOG_FORMAT_PLAIN ? stderr_plain_fmt : format ;
@@ -675,15 +675,15 @@ static void stderr_pre_fmt_func(log_print_f gen_print_func, int log_level,
675
675
}
676
676
677
677
static void syslog_pre_fmt_func (log_print_f gen_print_func , int log_level ,
678
- int facility , char * module , const char * func ,
678
+ int facility , const char * module , const char * func ,
679
679
char * stderr_plain_fmt , char * syslog_plain_fmt , char * format , va_list ap )
680
680
{
681
681
char * fmt = syslog_log_format == LOG_FORMAT_PLAIN ? syslog_plain_fmt : format ;
682
682
683
683
gen_print_func (log_level , facility , module , func , fmt , ap );
684
684
}
685
685
686
- void dprint (int log_level , int facility , char * module , const char * func ,
686
+ void dprint (int log_level , int facility , const char * module , const char * func ,
687
687
char * stderr_fmt , char * syslog_fmt , char * format , ...)
688
688
{
689
689
va_list ap , ap_copy ;
0 commit comments