Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/9742a8317f66cc2802b3d92456ec0516a6de8c79
...commit
http://git.netsurf-browser.org/netsurf.git/commit/9742a8317f66cc2802b3d92456ec0516a6de8c79
...tree
http://git.netsurf-browser.org/netsurf.git/tree/9742a8317f66cc2802b3d92456ec0516a6de8c79
The branch, master has been updated
via 9742a8317f66cc2802b3d92456ec0516a6de8c79 (commit)
via 6683818c182d396d17ea8bde035a91da20da9e9c (commit)
from 3fcba68fcffb7fba55be54d1beab9184e96f2b3a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=9742a8317f66cc2802b3d92456ec0516a6de8c79
commit 9742a8317f66cc2802b3d92456ec0516a6de8c79
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
Dukky: Add and utilise a jserrors category
Normal, and verbose logging will now also log all JS errors in order that we
stand a chance of debugging things more easily when testing.
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/Makefile.config.example b/Makefile.config.example
index 9b461f5..988fd0a 100644
--- a/Makefile.config.example
+++ b/Makefile.config.example
@@ -45,7 +45,7 @@
# override NETSURF_LOG_LEVEL := DEBUG
### To change the compiled in default log, change this
-# override NETSURF_DEFAULT_LOG_FILTER := level:WARNING
+# override NETSURF_BUILTIN_LOG_FILTER := "(level:WARNING || cat:jserrors)"
### To change the compiled in *verbose* log, change this
-# override NETSURF_DEFAULT_VERBOSE_FILTER := level:VERBOSE
+# override NETSURF_BUILTIN_VERBOSE_FILTER := "(level:VERBOSE || cat:jserrors)"
diff --git a/Makefile.defaults b/Makefile.defaults
index cebd41c..12c83a1 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -84,10 +84,10 @@ NETSURF_USE_NSLOG := AUTO
# Valid options are: DEEPDEBUG, DEBUG, VERBOSE, INFO, WARNING, ERROR, CRITICAL
NETSURF_LOG_LEVEL := INFO
# The log filter set during log initialisation before options are available
-NETSURF_BUILTIN_LOG_FILTER := level:WARNING
+NETSURF_BUILTIN_LOG_FILTER := "(level:WARNING || cat:jserrors)"
# The log filter set during log initialisation before options are available
# if the logging level is set to verbose
-NETSURF_BUILTIN_VERBOSE_FILTER := level:VERBOSE
+NETSURF_BUILTIN_VERBOSE_FILTER := "(level:VERBOSE || cat:jserrors)"
# Enable stripping the NetSurf binary
# Valid options: YES, NO
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index dcee8c5..4dc97aa 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -761,7 +761,7 @@ static void dukky_dump_error(duk_context *ctx)
/* stack is ..., errobj */
duk_idx_t stacktop = duk_get_top(ctx);
if (!duk_is_error(ctx, -1)) {
- NSLOG(dukky, INFO, "Uncaught non-Error derived error in JS:
%s", duk_safe_to_string(ctx, -1));
+ NSLOG(jserrors, WARNING, "Uncaught non-Error derived error in
JS: %s", duk_safe_to_string(ctx, -1));
} else {
#define GETTER(what) \
if (duk_has_prop_string(ctx, stacktop - 1, what)) { \
@@ -781,11 +781,11 @@ static void dukky_dump_error(duk_context *ctx)
GETTER("fileName");
GETTER("lineNumber");
GETTER("stack");
- NSLOG(dukky, DEBUG, "Uncaught error in JS: %s: %s",
+ NSLOG(jserrors, DEBUG, "Uncaught error in JS: %s: %s",
duk_safe_to_string(ctx, -5), duk_safe_to_string(ctx, -4));
- NSLOG(dukky, DEBUG, " was at: %s line %s",
+ NSLOG(jserrors, DEBUG, " was at: %s line %s",
duk_safe_to_string(ctx, -3), duk_safe_to_string(ctx, -2));
- NSLOG(dukky, DEBUG, " Stack trace: %s",
+ NSLOG(jserrors, DEBUG, " Stack trace: %s",
duk_safe_to_string(ctx, -1));
#undef GETTER
}
diff --git a/utils/log.c b/utils/log.c
index 2168e64..68b188e 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -100,6 +100,7 @@ NSLOG_DEFINE_CATEGORY(schedule, "Scheduler");
NSLOG_DEFINE_CATEGORY(fbtk, "Framebuffer toolkit");
NSLOG_DEFINE_CATEGORY(layout, "Layout");
NSLOG_DEFINE_CATEGORY(dukky, "Duktape JavaScript Binding");
+NSLOG_DEFINE_CATEGORY(jserrors, "JavaScript error messages");
static void
netsurf_render_log(void *_ctx,
diff --git a/utils/log.h b/utils/log.h
index 24832c0..02a886c 100644
--- a/utils/log.h
+++ b/utils/log.h
@@ -85,6 +85,7 @@ NSLOG_DECLARE_CATEGORY(schedule);
NSLOG_DECLARE_CATEGORY(fbtk);
NSLOG_DECLARE_CATEGORY(layout);
NSLOG_DECLARE_CATEGORY(dukky);
+NSLOG_DECLARE_CATEGORY(jserrors);
#else /* WITH_NSLOG */
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=6683818c182d396d17ea8bde035a91da20da9e9c
commit 6683818c182d396d17ea8bde035a91da20da9e9c
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
Makefile.config.example: Document logging options
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/Makefile.config.example b/Makefile.config.example
index 7fa7f41..9b461f5 100644
--- a/Makefile.config.example
+++ b/Makefile.config.example
@@ -39,3 +39,13 @@
### If you're using the sanitizers and you want it to stop on failure...
# override NETSURF_RECOVER_SANITIZERS := NO
+
+### To change the compiled in log level, alter this.
+# Valid options are: DEEPDEBUG, DEBUG, VERBOSE, INFO, WARNING, ERROR, CRITICAL
+# override NETSURF_LOG_LEVEL := DEBUG
+
+### To change the compiled in default log, change this
+# override NETSURF_DEFAULT_LOG_FILTER := level:WARNING
+
+### To change the compiled in *verbose* log, change this
+# override NETSURF_DEFAULT_VERBOSE_FILTER := level:VERBOSE
-----------------------------------------------------------------------
Summary of changes:
Makefile.config.example | 10 ++++++++++
Makefile.defaults | 4 ++--
content/handlers/javascript/duktape/dukky.c | 8 ++++----
utils/log.c | 1 +
utils/log.h | 1 +
5 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/Makefile.config.example b/Makefile.config.example
index 7fa7f41..988fd0a 100644
--- a/Makefile.config.example
+++ b/Makefile.config.example
@@ -39,3 +39,13 @@
### If you're using the sanitizers and you want it to stop on failure...
# override NETSURF_RECOVER_SANITIZERS := NO
+
+### To change the compiled in log level, alter this.
+# Valid options are: DEEPDEBUG, DEBUG, VERBOSE, INFO, WARNING, ERROR, CRITICAL
+# override NETSURF_LOG_LEVEL := DEBUG
+
+### To change the compiled in default log, change this
+# override NETSURF_BUILTIN_LOG_FILTER := "(level:WARNING || cat:jserrors)"
+
+### To change the compiled in *verbose* log, change this
+# override NETSURF_BUILTIN_VERBOSE_FILTER := "(level:VERBOSE || cat:jserrors)"
diff --git a/Makefile.defaults b/Makefile.defaults
index cebd41c..12c83a1 100644
--- a/Makefile.defaults
+++ b/Makefile.defaults
@@ -84,10 +84,10 @@ NETSURF_USE_NSLOG := AUTO
# Valid options are: DEEPDEBUG, DEBUG, VERBOSE, INFO, WARNING, ERROR, CRITICAL
NETSURF_LOG_LEVEL := INFO
# The log filter set during log initialisation before options are available
-NETSURF_BUILTIN_LOG_FILTER := level:WARNING
+NETSURF_BUILTIN_LOG_FILTER := "(level:WARNING || cat:jserrors)"
# The log filter set during log initialisation before options are available
# if the logging level is set to verbose
-NETSURF_BUILTIN_VERBOSE_FILTER := level:VERBOSE
+NETSURF_BUILTIN_VERBOSE_FILTER := "(level:VERBOSE || cat:jserrors)"
# Enable stripping the NetSurf binary
# Valid options: YES, NO
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index dcee8c5..4dc97aa 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -761,7 +761,7 @@ static void dukky_dump_error(duk_context *ctx)
/* stack is ..., errobj */
duk_idx_t stacktop = duk_get_top(ctx);
if (!duk_is_error(ctx, -1)) {
- NSLOG(dukky, INFO, "Uncaught non-Error derived error in JS:
%s", duk_safe_to_string(ctx, -1));
+ NSLOG(jserrors, WARNING, "Uncaught non-Error derived error in
JS: %s", duk_safe_to_string(ctx, -1));
} else {
#define GETTER(what) \
if (duk_has_prop_string(ctx, stacktop - 1, what)) { \
@@ -781,11 +781,11 @@ static void dukky_dump_error(duk_context *ctx)
GETTER("fileName");
GETTER("lineNumber");
GETTER("stack");
- NSLOG(dukky, DEBUG, "Uncaught error in JS: %s: %s",
+ NSLOG(jserrors, DEBUG, "Uncaught error in JS: %s: %s",
duk_safe_to_string(ctx, -5), duk_safe_to_string(ctx, -4));
- NSLOG(dukky, DEBUG, " was at: %s line %s",
+ NSLOG(jserrors, DEBUG, " was at: %s line %s",
duk_safe_to_string(ctx, -3), duk_safe_to_string(ctx, -2));
- NSLOG(dukky, DEBUG, " Stack trace: %s",
+ NSLOG(jserrors, DEBUG, " Stack trace: %s",
duk_safe_to_string(ctx, -1));
#undef GETTER
}
diff --git a/utils/log.c b/utils/log.c
index 2168e64..68b188e 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -100,6 +100,7 @@ NSLOG_DEFINE_CATEGORY(schedule, "Scheduler");
NSLOG_DEFINE_CATEGORY(fbtk, "Framebuffer toolkit");
NSLOG_DEFINE_CATEGORY(layout, "Layout");
NSLOG_DEFINE_CATEGORY(dukky, "Duktape JavaScript Binding");
+NSLOG_DEFINE_CATEGORY(jserrors, "JavaScript error messages");
static void
netsurf_render_log(void *_ctx,
diff --git a/utils/log.h b/utils/log.h
index 24832c0..02a886c 100644
--- a/utils/log.h
+++ b/utils/log.h
@@ -85,6 +85,7 @@ NSLOG_DECLARE_CATEGORY(schedule);
NSLOG_DECLARE_CATEGORY(fbtk);
NSLOG_DECLARE_CATEGORY(layout);
NSLOG_DECLARE_CATEGORY(dukky);
+NSLOG_DECLARE_CATEGORY(jserrors);
#else /* WITH_NSLOG */
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org