4 * Copyright (c) the Notion team 2013
6 * See the included file LICENSE for details.
14 /** For this category, show log messages at this loglevel and above */
15 LogLevel
minimumLevel(LogCategory category
)
19 /** For https://sourceforge.net/p/notion/bugs/63/ */
26 void vlog_message(LogLevel level
, LogCategory category
, const char *file
, int line
, const char* message
, va_list argp
)
28 if(level
>= minimumLevel(category
)){
29 fprintf(stderr
, "Notion: ");
31 fprintf(stderr
, "%s:%d: ", file
, line
);
32 vfprintf(stderr
, message
, argp
);
33 fprintf(stderr
, "\n");
37 void log_message(LogLevel level
, LogCategory category
, const char *file
, int line
, const char* message
, ...)
40 va_start(argp
, message
);
41 vlog_message(level
, category
, file
, line
, message
, argp
);
45 #if __STDC_VERSION__ < 199901L
46 extern void LOG(LogLevel level
, LogCategory category
, const char* message
, ...)
49 va_start(argp
, message
);
50 vlog_message(level
, category
, NULL
, -1, message
, argp
);