1838. [placeholder] rt13707
-1837. [placeholder] rt13714
+1837. [bug] Compile time option ISC_FACILITY was not effective
+ for 'named -u <user>'. [RT #13714]
1836. [cleanup] Silence compiler warnings in hash_test.c.
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.c,v 1.40 2005/04/29 00:22:27 marka Exp $ */
+/* $Id: log.c,v 1.41 2005/05/20 01:19:42 marka Exp $ */
/*! \file */
isc_result_t
ns_log_setsafechannels(isc_logconfig_t *lcfg) {
isc_result_t result;
+#if ISC_FACILITY != LOG_DAEMON
+ isc_logdestination_t destination;
+#endif
if (! ns_g_logstderr) {
result = isc_log_createchannel(lcfg, "default_debug",
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
}
+#if ISC_FACILITY != LOG_DAEMON
+ destination.facility = ISC_FACILITY;
+ result = isc_log_createchannel(lcfg, "default_syslog",
+ ISC_LOG_TOSYSLOG, ISC_LOG_INFO,
+ &destination, 0);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
+#endif
+
result = ISC_R_SUCCESS;
cleanup: