mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-26 16:47:31 -04:00
use isc_log_wouldlog() to avoid unnecessary formatting work
when the debug level does not warrant logging
This commit is contained in:
parent
720319de67
commit
211ac47e07
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue