logconf.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
/*
* Copyright (C) 1999-2001, 2004-2007, 2011, 2013-2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: logconf.c,v 1.45 2011/03/05 23:52:29 tbox Exp $ */
/*! \file */
#include <config.h>
} while (0)
/*%
* Set up a logging category according to the named.conf data
* in 'ccat' and add it to 'logconfig'.
*/
static isc_result_t
const char *catname;
"unknown logging category '%s' ignored",
catname);
/*
* Allow further processing by returning success.
*/
return (ISC_R_SUCCESS);
}
return (ISC_R_SUCCESS);
{
module);
if (result != ISC_R_SUCCESS) {
"logging channel '%s': %s", channelname,
return (result);
}
}
return (ISC_R_SUCCESS);
}
/*%
* Set up a logging channel according to the named.conf data
* in 'cchan' and add it to 'logconfig'.
*/
static isc_result_t
{
unsigned int type;
unsigned int flags = 0;
int level;
const char *channelname;
int i;
i = 0;
i++;
i++;
i++;
i++;
if (i != 1) {
"channel '%s': exactly one of file, syslog, "
"null, and stderr must be present", channelname);
return (ISC_R_FAILURE);
}
const cfg_obj_t *versionsobj =
isc_offset_t size = 0;
int facility = LOG_DAEMON;
if (cfg_obj_isstring(syslogobj)) {
&facility);
}
}
/*
* Munge flags.
*/
{
}
if (cfg_obj_isstring(severity)) {
} else
/* debug */
}
else
/*
* Test to make sure that file is a plain file.
* Fix defect #22771
*/
/*
* Test that the file can be opened, since
* isc_log_open() can't effectively report
* failures when called in isc_log_doit().
*/
if (result != ISC_R_SUCCESS) {
"isc_stdio_open '%s' failed: "
"isc_stdio_open '%s' failed: %s\n",
} else
(void)isc_stdio_close(fp);
goto done;
}
}
done:
return (result);
}
const cfg_listelt_t *element;
{
}
{
if (!default_set) {
}
if (!unmatched_set) {
}
}
return (ISC_R_SUCCESS);
return (result);
}