62#define NSLOG_LEVEL_DD NSLOG_LEVEL_DEEPDEBUG
63#define NSLOG_LEVEL_DBG NSLOG_LEVEL_DEBUG
64#define NSLOG_LEVEL_CHAT NSLOG_LEVEL_VERBOSE
65#define NSLOG_LEVEL_WARN NSLOG_LEVEL_WARNING
66#define NSLOG_LEVEL_ERR NSLOG_LEVEL_ERROR
67#define NSLOG_LEVEL_CRIT NSLOG_LEVEL_CRITICAL
69#ifndef NSLOG_COMPILED_MIN_LEVEL
78#define NSLOG_COMPILED_MIN_LEVEL NSLOG_LEVEL_DEBUG
127#define NSLOG_DECLARE_CATEGORY(catname) \
128 extern nslog_category_t __nslog_category_##catname
139#define NSLOG_DEFINE_CATEGORY(catname, description) \
140 nslog_category_t __nslog_category_##catname = { \
162#define NSLOG_DEFINE_SUBCATEGORY(parentcatname, catname, description) \
163 nslog_category_t __nslog_category_##catname = { \
166 &__nslog_category_##parentcatname, \
184#define NSLOG(catname, level, logmsg, args...) \
186 if (NSLOG_LEVEL_##level >= NSLOG_COMPILED_MIN_LEVEL) { \
187 static nslog_entry_context_t _nslog_ctx = { \
188 &__nslog_category_##catname, \
189 NSLOG_LEVEL_##level, \
191 sizeof(__FILE__) - 1, \
192 __PRETTY_FUNCTION__, \
193 sizeof(__PRETTY_FUNCTION__) - 1, \
196 nslog__log(&_nslog_ctx, logmsg, ##args); \
212 ...) __attribute__ ((format (printf, 2, 3)));
243 const char *fmt, va_list args);
nslog_filter_t * nslog_filter_ref(nslog_filter_t *filter)
nslog_error nslog_filter_filename_new(const char *filename, nslog_filter_t **filter)
nslog_error nslog_filter_or_new(nslog_filter_t *left, nslog_filter_t *right, nslog_filter_t **filter)
const char * nslog_level_name(nslog_level level)
nslog_error nslog_set_render_callback(nslog_callback cb, void *context)
nslog_error nslog_filter_xor_new(nslog_filter_t *left, nslog_filter_t *right, nslog_filter_t **filter)
struct nslog_entry_context_s nslog_entry_context_t
nslog_error nslog_filter_set_active(nslog_filter_t *filter, nslog_filter_t **prev)
nslog_error nslog_filter_not_new(nslog_filter_t *input, nslog_filter_t **filter)
void(* nslog_callback)(void *context, nslog_entry_context_t *ctx, const char *fmt, va_list args)
nslog_error nslog_filter_category_new(const char *catname, nslog_filter_t **filter)
char * nslog_filter_sprintf(nslog_filter_t *filter)
nslog_error nslog_filter_dirname_new(const char *dirname, nslog_filter_t **filter)
nslog_error nslog_filter_and_new(nslog_filter_t *left, nslog_filter_t *right, nslog_filter_t **filter)
const char * nslog_short_level_name(nslog_level level)
nslog_error nslog_filter_level_new(nslog_level level, nslog_filter_t **filter)
nslog_error nslog_filter_funcname_new(const char *funcname, nslog_filter_t **filter)
nslog_error nslog_uncork(void)
struct nslog_category_s nslog_category_t
void nslog__log(nslog_entry_context_t *ctx, const char *pattern,...) __attribute__((format(printf
nslog_filter_t * nslog_filter_unref(nslog_filter_t *filter)
nslog_error nslog_filter_from_text(const char *input, nslog_filter_t **output)
struct nslog_filter_s nslog_filter_t
struct nslog_category_s * next
struct nslog_category_s * parent
nslog_category_t * category