68#ifndef NETSURF_LOG_LEVEL
69#define NETSURF_LOG_LEVEL INFO
72#define NSLOG_LVL(level) NSLOG_LEVEL_ ## level
73#define NSLOG_EVL(level) NSLOG_LVL(level)
74#define NSLOG_COMPILED_MIN_LEVEL NSLOG_EVL(NETSURF_LOG_LEVEL)
78#include <nslog/nslog.h>
80NSLOG_DECLARE_CATEGORY(netsurf);
82NSLOG_DECLARE_CATEGORY(
fetch);
83NSLOG_DECLARE_CATEGORY(plot);
84NSLOG_DECLARE_CATEGORY(schedule);
85NSLOG_DECLARE_CATEGORY(
fbtk);
86NSLOG_DECLARE_CATEGORY(layout);
87NSLOG_DECLARE_CATEGORY(flex);
88NSLOG_DECLARE_CATEGORY(dukky);
89NSLOG_DECLARE_CATEGORY(jserrors);
103extern void nslog_log(
const char *file,
const char *func,
int ln,
const char *format, ...)
__attribute__ ((format (printf, 4, 5)));
106# define LOG_FN __PRETTY_FUNCTION__
107# define LOG_LN __LINE__
108# elif defined(__CC_NORCROFT)
109# define LOG_FN __func__
110# define LOG_LN __LINE__
113# define LOG_LN __LINE__
116#define NSLOG(catname, level, logmsg, args...) \
118 if (NSLOG_LEVEL_##level >= NSLOG_COMPILED_MIN_LEVEL) { \
119 nslog_log(__FILE__, LOG_FN, LOG_LN, logmsg , ##args); \
static const __attribute__((used))
nserror
Enumeration of error codes.
static struct llcache_s * llcache
low level cache state
nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv)
Initialise the logging system.
bool verbose_log
flag to enable verbose logging
void nslog_log(const char *file, const char *func, int ln, const char *format,...) __attribute__((format(printf
nserror nslog_set_filter_by_options(void)
Set the logging filter according to the options.
bool() nslog_ensure_t(FILE *fptr)
Ensures the FILE handle is available to write logging to.
void nslog_finalise(void)
Shut down the logging system.
nserror nslog_set_filter(const char *filter)
Set the logging filter.
Information for a single fetch.