qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [2/2] qpid-dispatch git commit: DISPATCH-412: Support 'stdout' as log destination as well as 'stderr'
Date Tue, 28 Jun 2016 20:38:56 GMT
DISPATCH-412: Support 'stdout' as log destination as well as 'stderr'


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/fa6fafab
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/fa6fafab
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/fa6fafab

Branch: refs/heads/master
Commit: fa6fafabf4c1d6fe2a4ee2794932b9f4adbc1802
Parents: 34040b4
Author: Alan Conway <aconway@redhat.com>
Authored: Tue Jun 28 10:10:32 2016 -0400
Committer: Alan Conway <aconway@redhat.com>
Committed: Tue Jun 28 16:36:09 2016 -0400

----------------------------------------------------------------------
 src/log.c | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/fa6fafab/src/log.c
----------------------------------------------------------------------
diff --git a/src/log.c b/src/log.c
index 4cd52c8..3e5aca6 100644
--- a/src/log.c
+++ b/src/log.c
@@ -79,6 +79,7 @@ DEQ_DECLARE(log_sink_t, log_sink_list_t);
 
 static log_sink_list_t sink_list = {0};
 
+static const char* SINK_STDOUT = "stdout";
 static const char* SINK_STDERR = "stderr";
 static const char* SINK_SYSLOG = "syslog";
 static const char* SOURCE_DEFAULT = "DEFAULT";
@@ -118,6 +119,9 @@ static log_sink_t* log_sink_lh(const char* name) {
         if (strcmp(name, SINK_STDERR) == 0) {
             file = stderr;
         }
+        else if (strcmp(name, SINK_STDOUT) == 0) {
+            file = stdout;
+        }
         else if (strcmp(name, SINK_SYSLOG) == 0) {
             openlog(0, 0, LOG_DAEMON);
             syslog = true;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message