AlcapDAQ  1
diag.h
Go to the documentation of this file.
1 #include <stdarg.h>
2 
3 extern int diag_print_threshold;
4 extern int diag_cm_msg_threshold;
5 
6 void diag_print_setup();
7 void diag_print_impl(int level, char *format, va_list ap);
8 
9 inline void diag_print(int level, char *format, ...)
10 {
11  if(diag_print_threshold < 0) {
13  }
14 
15  // Return immediately if we don't even need to format the message.
16  if(level > diag_print_threshold && level > diag_cm_msg_threshold) {
17  return;
18  }
19 
20  va_list argp;
21  va_start(argp, format);
22  diag_print_impl(level, format, argp);
23  va_end(argp);
24 
25 }