comparison src/c/urweb.c @ 2143:4895c41b2ec6

Make naughtyDebug use protocol-specific logging
author Adam Chlipala <adam@chlipala.net>
date Sun, 10 May 2015 12:13:12 -0400
parents 882556b3029d
children 8a01e8f21de9 2b1af5dc6dee
comparison
equal deleted inserted replaced
2142:3288e3c9948b 2143:4895c41b2ec6
4218 } 4218 }
4219 4219
4220 size_t uw_database_max = SIZE_MAX; 4220 size_t uw_database_max = SIZE_MAX;
4221 4221
4222 uw_Basis_int uw_Basis_naughtyDebug(uw_context ctx, uw_Basis_string s) { 4222 uw_Basis_int uw_Basis_naughtyDebug(uw_context ctx, uw_Basis_string s) {
4223 fprintf(stderr, "%s\n", s); 4223 if (ctx->loggers->log_debug)
4224 ctx->loggers->log_debug(ctx->loggers->logger_data, "%s\n", s);
4225 else
4226 fprintf(stderr, "%s\n", s);
4224 return 0; 4227 return 0;
4225 } 4228 }
4226 4229
4227 uw_Basis_unit uw_Basis_debug(uw_context ctx, uw_Basis_string s) { 4230 uw_Basis_unit uw_Basis_debug(uw_context ctx, uw_Basis_string s) {
4228 if (ctx->loggers->log_debug) 4231 if (ctx->loggers->log_debug)