changeset 2143:4895c41b2ec6

Make naughtyDebug use protocol-specific logging
author Adam Chlipala <adam@chlipala.net>
date Sun, 10 May 2015 12:13:12 -0400
parents 3288e3c9948b
children f55b0e45422f
files src/c/urweb.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/c/urweb.c	Mon May 04 14:35:07 2015 -0400
+++ b/src/c/urweb.c	Sun May 10 12:13:12 2015 -0400
@@ -4220,7 +4220,10 @@
 size_t uw_database_max = SIZE_MAX;
 
 uw_Basis_int uw_Basis_naughtyDebug(uw_context ctx, uw_Basis_string s) {
-  fprintf(stderr, "%s\n", s);
+  if (ctx->loggers->log_debug)
+    ctx->loggers->log_debug(ctx->loggers->logger_data, "%s\n", s);
+  else
+    fprintf(stderr, "%s\n", s);
   return 0;
 }