2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

use isc_log_wouldlog() to avoid unnecessary formatting work

when the debug level does not warrant logging
This commit is contained in:
Andreas Gustafsson 2000-07-13 00:25:38 +00:00
parent 720319de67
commit 211ac47e07

View File

@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: socket.c,v 1.147 2000/07/10 19:40:06 explorer Exp $ */
/* $Id: socket.c,v 1.148 2000/07/13 00:25:38 gson Exp $ */
#include <config.h>
@ -245,6 +245,9 @@ socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
char peerbuf[256];
va_list ap;
if (! isc_log_wouldlog(isc_lctx, level))
return;
va_start(ap, fmt);
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
va_end(ap);