The new option "SyslogFacility" deines the syslog "facility" to which
ngIRCd should send log messages.
Possible values are system dependant, but most probably "auth", "daemon",
"user" and "local1" through "local7" are possible values; see syslog(3).
Default is "local5" for historical reasons.
+ - New configuration option "SyslogFacility" to define the syslog "facility"
+ (the "target"), to which ngIRCd should send its log messages.
+ Possible values are system dependant, but most probably "auth", "daemon",
+ "user" and "local1" through "local7" are possible values; see syslog(3).
+ Default is "local5" for historical reasons.
- Dump the "internal server state" (configured servers, established
connections and known clients) to the console or syslog when receiving
the SIGUSR2 signal and debug mode is enabled.
- Dump the "internal server state" (configured servers, established
connections and known clients) to the console or syslog when receiving
the SIGUSR2 signal and debug mode is enabled.
+ - New configuration option "SyslogFacility" to define the syslog "facility"
+ (the "target"), to which ngIRCd should send its log messages.
+ Possible values are system dependant, but most probably "auth", "daemon",
+ "user" and "local1" through "local7" are possible values; see syslog(3).
+ Default is "local5" for historical reasons.
- Dump the "internal server state" (configured servers, established
connections and known clients) to the console or syslog when receiving
the SIGUSR2 signal and debug mode is enabled.
- Dump the "internal server state" (configured servers, established
connections and known clients) to the console or syslog when receiving
the SIGUSR2 signal and debug mode is enabled.
# so the server listens on all IP addresses of the system by default.
;Listen = 127.0.0.1,192.168.0.1
# so the server listens on all IP addresses of the system by default.
;Listen = 127.0.0.1,192.168.0.1
+ # Syslog "facility" to which ngIRCd should send log messages.
+ # Possible values are system dependant, but most probably auth, daemon,
+ # user and local1 through local7 are possible values; see syslog(3).
+ # Default is "local5" for historical reasons, you probably want to
+ # change this to "daemon", for example.
+ SyslogFacility = local1
+
# Text file with the "message of the day" (MOTD). This message will
# be shown to all users connecting to the server:
;MotdFile = /usr/local/etc/ngircd.motd
# Text file with the "message of the day" (MOTD). This message will
# be shown to all users connecting to the server:
;MotdFile = /usr/local/etc/ngircd.motd
with IPv6 support, "::,0.0.0.0". So the server listens on all configured
IP addresses and interfaces by default.
.TP
with IPv6 support, "::,0.0.0.0". So the server listens on all configured
IP addresses and interfaces by default.
.TP
+\fBSyslogFacility\fR
+Syslog "facility" to which ngIRCd should send log messages. Possible
+values are system dependant, but most probably "auth", "daemon", "user"
+and "local1" through "local7" are possible values; see syslog(3).
+Default is "local5" for historical reasons, you probably want to
+change this to "daemon", for example.
+.TP
\fBMotdFile\fR
Text file with the "message of the day" (MOTD). This message will be shown
to all users connecting to the server. Changes made to this file
\fBMotdFile\fR
Text file with the "message of the day" (MOTD). This message will be shown
to all users connecting to the server. Changes made to this file
printf(" ServerGID = %s\n", grp->gr_name);
else
printf(" ServerGID = %ld\n", (long)Conf_GID);
printf(" ServerGID = %s\n", grp->gr_name);
else
printf(" ServerGID = %ld\n", (long)Conf_GID);
+#ifdef SYSLOG
+ printf(" SyslogFacility = %s\n",
+ ngt_SyslogFacilityName(Conf_SyslogFacility));
+#endif
printf(" PingTimeout = %d\n", Conf_PingTimeout);
printf(" PongTimeout = %d\n", Conf_PongTimeout);
printf(" ConnectRetry = %d\n", Conf_ConnectRetry);
printf(" PingTimeout = %d\n", Conf_PingTimeout);
printf(" PongTimeout = %d\n", Conf_PongTimeout);
printf(" ConnectRetry = %d\n", Conf_ConnectRetry);
Conf_MaxJoins = 10;
Conf_MaxNickLength = CLIENT_NICK_LEN_DEFAULT;
Conf_MaxJoins = 10;
Conf_MaxNickLength = CLIENT_NICK_LEN_DEFAULT;
+#ifdef SYSLOG
+#ifdef LOG_LOCAL5
+ Conf_SyslogFacility = LOG_LOCAL5;
+#else
+ Conf_SyslogFacility = 0;
+#endif
+#endif
+
/* Initialize server configuration structures */
if (InitServers) {
for (i = 0; i < MAX_SERVERS;
/* Initialize server configuration structures */
if (InitServers) {
for (i = 0; i < MAX_SERVERS;
Conf_SSLOptions.DHFile = strdup_warn( Arg );
return;
}
Conf_SSLOptions.DHFile = strdup_warn( Arg );
return;
}
+#endif
+#ifdef SYSLOG
+ if (strcasecmp(Var, "SyslogFacility") == 0) {
+ Conf_SyslogFacility = ngt_SyslogFacilityID(Arg,
+ Conf_SyslogFacility);
+ return;
+ }
#endif
Config_Error(LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!",
NGIRCd_ConfFile, Line, Var);
#endif
Config_Error(LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!",
NGIRCd_ConfFile, Line, Var);
/* Maximum length of a nick name */
GLOBAL unsigned int Conf_MaxNickLength;
/* Maximum length of a nick name */
GLOBAL unsigned int Conf_MaxNickLength;
+#ifdef SYSLOG
+
+/* Syslog "facility" */
+GLOBAL int Conf_SyslogFacility;
+
+#endif
+
GLOBAL void Conf_Init PARAMS((void));
GLOBAL bool Conf_Rehash PARAMS((void));
GLOBAL int Conf_Test PARAMS((void));
GLOBAL void Conf_Init PARAMS((void));
GLOBAL bool Conf_Rehash PARAMS((void));
GLOBAL int Conf_Test PARAMS((void));
#include "conn.h"
#include "channel.h"
#include "irc-write.h"
#include "conn.h"
#include "channel.h"
#include "irc-write.h"
#include "exp.h"
#include "log.h"
#include "exp.h"
#include "log.h"
Is_Daemon = Daemon_Mode;
#ifdef SYSLOG
Is_Daemon = Daemon_Mode;
#ifdef SYSLOG
-#ifndef LOG_CONS /* Kludge: mips-dec-ultrix4.5 has no LOG_CONS/LOG_LOCAL5 */
+#ifndef LOG_CONS /* Kludge: mips-dec-ultrix4.5 has no LOG_CONS */
#define LOG_CONS 0
#endif
#define LOG_CONS 0
#endif
-#ifndef LOG_LOCAL5
-#define LOG_LOCAL5 0
-#endif
- openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
+ openlog(PACKAGE_NAME, LOG_CONS|LOG_PID, Conf_SyslogFacility);
#endif
Log( LOG_NOTICE, "%s started.", NGIRCd_Version );
#endif
Log( LOG_NOTICE, "%s started.", NGIRCd_Version );
Log_Init_Subprocess(char UNUSED *Name)
{
#ifdef SYSLOG
Log_Init_Subprocess(char UNUSED *Name)
{
#ifdef SYSLOG
- openlog( PACKAGE_NAME, LOG_CONS|LOG_PID, LOG_LOCAL5 );
+ openlog(PACKAGE_NAME, LOG_CONS|LOG_PID, Conf_SyslogFacility);
#endif
#ifdef DEBUG
Log_Subprocess(LOG_DEBUG, "%s sub-process starting, PID %ld.",
#endif
#ifdef DEBUG
Log_Subprocess(LOG_DEBUG, "%s sub-process starting, PID %ld.",