+GLOBAL void
+Log_Init_Subprocess(char UNUSED *Name)
+{
+#ifdef SYSLOG
+ openlog(PACKAGE_NAME, LOG_CONS|LOG_PID, Conf_SyslogFacility);
+#endif
+#ifdef DEBUG
+ Log_Subprocess(LOG_DEBUG, "%s sub-process starting, PID %ld.",
+ Name, (long)getpid());
+#endif
+}
+
+
+GLOBAL void
+Log_Exit_Subprocess(char UNUSED *Name)
+{
+#ifdef DEBUG
+ Log_Subprocess(LOG_DEBUG, "%s sub-process %ld done.",
+ Name, (long)getpid());
+#endif
+#ifdef SYSLOG
+ closelog( );
+#endif
+}
+
+
+#ifdef PROTOTYPES
+GLOBAL void
+Log_Subprocess(const int Level, const char *Format, ...)
+#else
+GLOBAL void
+Log_Subprocess(Level, Format, va_alist)
+const int Level;
+const char *Format;
+va_dcl
+#endif
+{
+ char msg[MAX_LOG_MSG_LEN];
+ va_list ap;
+
+ assert(Format != NULL);
+
+#ifdef DEBUG
+ if ((Level == LOG_DEBUG) && (!NGIRCd_Debug))
+ return;
+#else
+ if (Level == LOG_DEBUG)
+ return;
+#endif
+
+#ifdef PROTOTYPES
+ va_start(ap, Format);
+#else
+ va_start(ap);
+#endif
+ vsnprintf(msg, MAX_LOG_MSG_LEN, Format, ap);
+ va_end(ap);
+
+ Log_Message(Level, msg);
+}
+
+
+/**
+ * Send a log message to all local users flagged with the given user mode.
+ * @param UserMode User mode which the target user must have set,
+ * @param Format The format string.
+ */
+#ifdef PROTOTYPES
+GLOBAL void
+Log_ServerNotice(const char UserMode, const char *Format, ... )
+#else
+GLOBAL void
+Log_ServerNotice(UserMode, Format, va_alist)
+const char UserMode;
+const char *Format;
+va_dcl
+#endif
+{
+ CLIENT *c;
+ char msg[MAX_LOG_MSG_LEN];
+ va_list ap;
+
+ assert(Format != NULL);
+
+#ifdef PROTOTYPES
+ va_start(ap, Format);
+#else
+ va_start(ap);
+#endif
+ vsnprintf(msg, MAX_LOG_MSG_LEN, Format, ap);
+ va_end(ap);
+
+ for(c=Client_First(); c != NULL; c=Client_Next(c)) {
+ if (Client_Conn(c) > NONE && Client_HasMode(c, UserMode))
+ IRC_WriteStrClient(c, "NOTICE %s :%s%s", Client_ID(c),
+ NOTICE_TXTPREFIX, msg);
+ }
+} /* Log_ServerNotice */
+
+