1 /* Copyright 2001,2002,2003 Roger Dingledine, Matej Pfajfar. */
2 /* See LICENSE for licensing information */
9 #define LOG_WARN LOG_WARNING
17 /* magic to make GCC check for proper format strings. */
19 #define CHECK_PRINTF(formatIdx, firstArg) \
20 __attribute__ ((format (printf, formatIdx, firstArg)))
22 #define CHECK_PRINTF(formatIdx, firstArg)
25 void add_stream_log(int loglevel
, const char *name
, FILE *stream
);
26 int add_file_log(int severity
, const char *filename
);
30 /* Outputs a message to stdout */
31 void _log(int severity
, const char *format
, ...) CHECK_PRINTF(2,3);
34 void _log_fn(int severity
, const char *funcname
, const char *format
, ...)
36 #define log_fn(severity, args...) \
37 _log_fn(severity, __PRETTY_FUNCTION__, args)
41 #define log _log /* hack it so we don't conflict with log() as much */