<term>SYSLOG_FACILITY (<type>string</type>)</term>
<listitem>
<para>
- If the SYSLOG option is set to 1 or greater, this option determines
- the <application>syslog</application> facility used. You may choose
- from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
- the default is LOCAL0
+ This option determines the <application>syslog</application>
+ <quote>facility</quote> to be used when syslog is enabled.
+ You may choose from LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4,
+ LOCAL5, LOCAL6, LOCAL7; the default is LOCAL0. See also the
+ documentation of your system's
+ <application>syslog</application>.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>SYSLOG_PROGID (<type>string</type>)</term>
+ <term>SYSLOG_IDENT (<type>string</type>)</term>
<listitem>
<para>
- If the SYSLOG option is set to 1 or greater, this option determines
- the program id used to identify <product>PostgreSQL</product> messages
- in <application>syslog</application> log messages. The default is
- postgres.
+ If logging to syslog is enabled, this option determines the
+ program name used to identify
+ <productname>PostgreSQL</productname> messages in
+ <application>syslog</application> log messages. The default
+ is <quote>postgres</quote>.
</para>
</listitem>
</varlistentry>
extern int XLOG_DEBUG;
#ifdef ENABLE_SYSLOG
extern char *Syslog_facility;
-extern char *Syslog_progid;
- bool check_facility(const char *facility);
+extern char *Syslog_ident;
+bool check_facility(const char *facility);
#endif
/*
{"unix_socket_group", PGC_POSTMASTER, &Unix_socket_group,
"", NULL},
+
#ifdef ENABLE_SYSLOG
- {"syslog_facility", PGC_SIGHUP, &Syslog_facility,
+ {"syslog_facility", PGC_POSTMASTER, &Syslog_facility,
"LOCAL0", check_facility},
- {"syslog_progid", PGC_SIGHUP, &Syslog_progid,
+ {"syslog_ident", PGC_POSTMASTER, &Syslog_ident,
"postgres", NULL},
#endif
bool boolval;
if (!parse_bool(value, &boolval))
{
- elog(elevel, "Option '%s' requires a boolean value", name);
+ elog(elevel, "option '%s' requires a boolean value", name);
return false;
}
if (DoIt)
if (!parse_int(value, &intval))
{
- elog(elevel, "Option '%s' expects an integer value", name);
+ elog(elevel, "option '%s' expects an integer value", name);
return false;
}
if (intval < conf->min || intval > conf->max)
{
- elog(elevel, "Option '%s' value %d is outside"
+ elog(elevel, "option '%s' value %d is outside"
" of permissible range [%d .. %d]",
name, intval, conf->min, conf->max);
return false;
if (!parse_real(value, &dval))
{
- elog(elevel, "Option '%s' expects a real number", name);
+ elog(elevel, "option '%s' expects a real number", name);
return false;
}
if (dval < conf->min || dval > conf->max)
{
- elog(elevel, "Option '%s' value %g is outside"
+ elog(elevel, "option '%s' value %g is outside"
" of permissible range [%g .. %g]",
name, dval, conf->min, conf->max);
return false;
{
if (conf->parse_hook && !(conf->parse_hook)(value))
{
- elog(elevel, "Option '%s' rejects value '%s'", name, value);
+ elog(elevel, "invalid value for option '%s': '%s'", name, value);
return false;
}
if (DoIt)
if (*cp == '-')
*cp = '_';
}
+
+
+
#ifdef ENABLE_SYSLOG
bool
check_facility(const char *facility)