00001 /* verbose.h - write out status messages according to the 00002 * current verbosity level. These messages go to stderr. */ 00003 00004 #ifndef VERBOSE_H 00005 #define VERBOSE_H 00006 00007 void verbose(int verbosity, char *format, ...) 00008 /* Write printf formatted message to log (which by 00009 * default is stderr) if global verbose variable 00010 * is set to verbosity or higher. */ 00011 #if defined(__GNUC__) && defined(JK_WARN) 00012 __attribute__((format(printf, 2, 3))) 00013 #endif 00014 ; 00015 00016 void verboseVa(int verbosity, char *format, va_list args); 00017 /* Log with at given verbosity vprintf formatted args. */ 00018 00019 void verboseDot(); 00020 /* Write I'm alive dot (at verbosity level 1) */ 00021 00022 boolean verboseDotsEnabled(); 00023 /* check if outputting of happy dots are enabled. They will be enabled if the 00024 * verbosity is > 0, stderr is a tty and we don't appear to be running an 00025 * emacs shell. */ 00026 00027 int verboseLevel(void); 00028 /* Get verbosity level. */ 00029 00030 void verboseSetLevel(int verbosity); 00031 /* Set verbosity level in log. 0 for no logging, 00032 * higher number for increasing verbosity. */ 00033 00034 void verboseSetLogFile(char *name); 00035 /* Set logFile for verbose messages overrides stderr. */ 00036 00037 FILE *verboseLogFile(); 00038 /* Get the verbose log file. */ 00039 00040 #endif /* VERBOSE_H */ 00041
1.5.2