summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-08 08:11:37 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-08 08:11:37 +0000
commit12c7e9ab4bba93e019f7f118d036d7dedcdf0037 (patch)
tree509a137398adf6760ce2cb5c2b5fa6723152b438
parentd8f3b6e993f3c7ffc254a646037674c430248418 (diff)
downloadrsyslog-12c7e9ab4bba93e019f7f118d036d7dedcdf0037.tar.gz
rsyslog-12c7e9ab4bba93e019f7f118d036d7dedcdf0037.tar.xz
rsyslog-12c7e9ab4bba93e019f7f118d036d7dedcdf0037.zip
all compile-time settings are now shown in rsyslogd -v, not just the active
ones
-rw-r--r--ChangeLog3
-rw-r--r--syslogd.c70
2 files changed, 49 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 386843c0..fc79d189 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@ Version 1.18.1 (rgerhards), 2007-08-??
- some code cleanup (moved action object to its own file set)
- add config directive $MainMsgQueueSize, which now allows to configure the
queue size dynamically
+- all compile-time settings are now shown in rsyslogd -v, not just the
+ active ones
+- enhanced performance a little bit more
---------------------------------------------------------------------------
Version 1.18.0 (rgerhards), 2007-08-03
- rsyslog now supports fallback actions when an action did not work. This
diff --git a/syslogd.c b/syslogd.c
index fee18c24..5f11f96d 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -5840,6 +5840,51 @@ finalize_it:
}
+/* print version and compile-time setting information.
+ */
+static void printVersion(void)
+{
+ printf("rsyslogd %s, ", VERSION);
+ printf("compiled with:\n");
+#ifdef USE_PTHREADS
+ printf("\tFEATURE_PTHREADS (dual-threading):\tYes\n");
+#else
+ printf("\tFEATURE_PTHREADS (dual-threading):\tNo\n");
+#endif
+#ifdef FEATURE_REGEXP
+ printf("\tFEATURE_REGEXP:\t\t\t\tYes\n");
+#else
+ printf("\tFEATURE_REGEXP:\t\t\t\tNo\n");
+#endif
+#ifdef WITH_DB
+ printf("\tFEATURE_DB (MySQL):\t\t\tYes\n");
+#else
+ printf("\tFEATURE_DB (MySQL):\t\t\tNo\n");
+#endif
+#ifndef NOLARGEFILE
+ printf("\tFEATURE_LARGEFILE:\t\t\tYes\n");
+#else
+ printf("\tFEATURE_LARGEFILE:\t\t\tNo\n");
+#endif
+#ifdef USE_NETZIP
+ printf("\tFEATURE_NETZIP (message compression):\tYes\n");
+#else
+ printf("\tFEATURE_NETZIP (message compression):\tNo\n");
+#endif
+#ifdef SYSLOG_INET
+ printf("\tSYSLOG_INET (Internet/remote support):\tYes\n");
+#else
+ printf("\tSYSLOG_INET (Internet/remote support):\tNo\n");
+#endif
+#ifndef NDEBUG
+ printf("\tFEATURE_DEBUG (debug build, slow code):\tYes\n");
+#else
+ printf("\tFEATURE_DEBUG (debug build, slow code):\tNo\n");
+#endif
+ printf("\nSee http://www.rsyslog.com for more information.\n");
+}
+
+
int main(int argc, char **argv)
{ register int i;
register char *p;
@@ -5967,30 +6012,7 @@ int main(int argc, char **argv)
bParseHOSTNAMEandTAG = 0;
break;
case 'v':
- printf("rsyslogd %s, ", VERSION);
- printf("compiled with:\n");
-#ifdef USE_PTHREADS
- printf("\tFEATURE_PTHREADS (dual-threading)\n");
-#endif
-#ifdef FEATURE_REGEXP
- printf("\tFEATURE_REGEXP\n");
-#endif
-#ifdef WITH_DB
- printf("\tFEATURE_DB\n");
-#endif
-#ifndef NOLARGEFILE
- printf("\tFEATURE_LARGEFILE\n");
-#endif
-#ifdef USE_NETZIP
- printf("\tFEATURE_NETZIP (syslog message compression)\n");
-#endif
-#ifdef SYSLOG_INET
- printf("\tSYSLOG_INET (Internet/remote support)\n");
-#endif
-#ifndef NDEBUG
- printf("\tFEATURE_DEBUG (debug build, slow code)\n");
-#endif
- printf("\nSee http://www.rsyslog.com for more information.\n");
+ printVersion();
exit(0); /* exit for -v option - so this is a "good one" */
case 'w': /* disable disallowed host warnigs */
option_DisallowWarning = 0;