cfg_obj_log now takes a log context instead of a parser

This commit is contained in:
Andreas Gustafsson
2001-02-22 20:41:43 +00:00
parent c3a56b9ab3
commit a9be709e8e
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: cfg.h,v 1.9 2001/02/22 04:17:37 gson Exp $ */
/* $Id: cfg.h,v 1.10 2001/02/22 20:41:43 gson Exp $ */
#ifndef DNS_CFG_H
#define DNS_CFG_H 1
@@ -272,7 +272,7 @@ void cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
*/
void
cfg_obj_log(cfg_parser_t *pctx, cfg_obj_t *obj, int level,
cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level,
const char *fmt, ...);
/*
* Log a message concerning configuration object 'obj' to the logging
+4 -4
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: parser.c,v 1.17 2001/02/22 05:45:28 bwelling Exp $ */
/* $Id: parser.c,v 1.18 2001/02/22 20:41:41 gson Exp $ */
#include <config.h>
@@ -3129,16 +3129,16 @@ parser_complain(cfg_parser_t *pctx, isc_boolean_t is_warning,
}
void
cfg_obj_log(cfg_parser_t *pctx, cfg_obj_t *obj, int level, const char *fmt, ...)
cfg_obj_log(cfg_obj_t *obj, isc_log_t *lctx, int level, const char *fmt, ...)
{
va_list ap;
char msgbuf[2048];
if (! isc_log_wouldlog(pctx->lctx, level))
if (! isc_log_wouldlog(lctx, level))
return;
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
isc_log_write(pctx->lctx, CAT, MOD, level,
isc_log_write(lctx, CAT, MOD, level,
"%s:%u: %s",
obj->file == NULL ? "<unknown file>" : obj->file,
obj->line, msgbuf);