From 72e6050eb3ae7c9e7a96936f2949bae7ef8ca4be Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 4 Sep 2017 14:31:12 +0100 Subject: add low level cache category and use it --- utils/log.c | 11 ++++------- utils/log.h | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'utils') diff --git a/utils/log.c b/utils/log.c index 2f0d3b3bf..834a3e933 100644 --- a/utils/log.c +++ b/utils/log.c @@ -1,9 +1,5 @@ /* - * Copyright 2007 Rob Kendrick - * Copyright 2004-2007 James Bursa - * Copyright 2003 Phil Mellor - * Copyright 2003 John M Bell - * Copyright 2004 John Tytgat + * Copyright 2017 Vincent Sanders * * This file is part of NetSurf, http://www.netsurf-browser.org/ * @@ -36,8 +32,6 @@ bool verbose_log = false; /** The stream to which logging is sent */ static FILE *logfile; -NSLOG_DEFINE_CATEGORY(netsurf, "NetSurf default logging"); - /** Subtract the `struct timeval' values X and Y * * \param result The timeval structure to store the result in @@ -97,6 +91,9 @@ static const char *nslog_gettime(void) #ifdef WITH_NSLOG +NSLOG_DEFINE_CATEGORY(netsurf, "NetSurf default logging"); +NSLOG_DEFINE_CATEGORY(llcache, "Low level cache"); + static void netsurf_render_log(void *_ctx, nslog_entry_context_t *ctx, diff --git a/utils/log.h b/utils/log.h index 0e73f4d37..50ceac0b1 100644 --- a/utils/log.h +++ b/utils/log.h @@ -43,6 +43,7 @@ typedef bool(nslog_ensure_t)(FILE *fptr); */ extern nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv); +/* ensure a logging level is defined */ #ifndef NETSURF_LOG_LEVEL #define NETSURF_LOG_LEVEL INFO #endif @@ -56,6 +57,7 @@ extern nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv); #include NSLOG_DECLARE_CATEGORY(netsurf); +NSLOG_DECLARE_CATEGORY(llcache); #else /* WITH_NSLOG */ @@ -89,8 +91,6 @@ extern void nslog_log(const char *file, const char *func, int ln, const char *fo } \ } while(0) -#define NSLOG_DEFINE_CATEGORY(catname, description) - #endif /* WITH_NSLOG */ #endif -- cgit v1.2.3