- /* initialize the syslog facility */
- if (running_as_daemon) openlog("Citadel", LOG_NDELAY, syslog_facility);
- else openlog("Citadel", LOG_PERROR|LOG_NDELAY, syslog_facility);
- setlogmask(LOG_UPTO(verbosity));
+#ifdef HAVE_BACKTRACE
+ bzero(¶ms, sizeof(params));
+ params.filename = file_pid_paniclog;
+ panic_fd=open(file_pid_paniclog, O_APPEND|O_CREAT|O_DIRECT);
+ params.filep = fopen(file_pid_paniclog, "a+");
+ params.debugLevel = ECRASH_DEBUG_VERBOSE;
+ params.dumpAllThreads = TRUE;
+ params.useBacktraceSymbols = 1;
+ params.signals[0]=SIGSEGV;
+ params.signals[1]=SIGILL;
+ params.signals[2]=SIGBUS;
+ params.signals[3]=SIGABRT;
+ eCrash_Init(¶ms);
+ eCrash_RegisterThread("MasterThread", 0);
+#endif
+
+ /* Initialize the syslogger. Yes, we are really using 0 as the
+ * facility, because we are going to bitwise-OR the facility to
+ * the severity of each message, allowing us to write to other
+ * facilities when we need to...
+ */
+ if (enable_syslog) {
+ openlog("citadel", LOG_NDELAY, 0);
+ setlogmask(LOG_UPTO(verbosity));
+ }