logconf.c revision 7052e191ce63fdf063a977695718ff426a27628e
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: logconf.c,v 1.34 2004/03/03 05:39:04 marka Exp $ */
#include <config.h>
} while (0)
/*
* Set up a logging category according to the named.conf data
* in 'ccat' and add it to 'lctx'.
*/
static isc_result_t
const char *catname;
"unknown logging category '%s' ignored",
catname);
/*
* Allow further processing by returning 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 'lctx'.
*/
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);
}
isc_offset_t size = 0;
int facility = LOG_DAEMON;
if (cfg_obj_isstring(syslogobj)) {
&facility);
}
}
/*
* Munge flags.
*/
{
}
if (cfg_obj_isstring(severity)) {
} else
/* debug */
}
/*
* 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)
"logging channel '%s' file '%s': %s",
else
(void)isc_stdio_close(fp);
/*
* Allow named to continue by returning success.
*/
}
return (result);
}
{
}
{
if (!default_set) {
}
if (!unmatched_set) {
}
}
if (!default_set)
if (!unmatched_set)
return (ISC_R_SUCCESS);
return (result);
}