Repository: qpid-dispatch
Updated Branches:
  refs/heads/master fa6fafabf -> 4797f4d1b (forced update)


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/4797f4d1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/4797f4d1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/4797f4d1

Branch: refs/heads/master
Commit: 4797f4d1b6a52851b37aa602be68c16342ec102a
Parents: 34040b4
Author: Alan Conway <[email protected]>
Authored: Tue Jun 28 10:10:32 2016 -0400
Committer: Alan Conway <[email protected]>
Committed: Wed Jun 29 10:40:54 2016 -0400

----------------------------------------------------------------------
 python/qpid_dispatch/management/qdrouter.json | 6 ++----
 src/log.c                                     | 4 ++++
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/4797f4d1/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json 
b/python/qpid_dispatch/management/qdrouter.json
index 1e6f513..e36896b 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -811,9 +811,7 @@
                 },
                 "enable": {
                     "type": "string",
-                    "default": "default",
-                    "required": true,
-                    "description": "Levels are: trace, debug, info, notice, 
warning, error, critical. The enable string is a comma-separated list of 
levels. A level may have a trailing '\\+' to enable that level and above. For 
example 'trace,debug,warning+' means enable trace, debug, warning, error and 
critical. The value 'none' means disable logging for the module. The value 
'default' means use the value from the DEFAULT module.",
+                    "description": "Levels are: trace, debug, info, notice, 
warning, error, critical. The enable string is a comma-separated list of 
levels. A level may have a trailing '\\+' to enable that level and above. For 
example 'trace,debug,warning+' means enable trace, debug, warning, error and 
critical. The value 'none' means disable logging for the module.",
                     "update": true
                 },
                 "timestamp": {
@@ -828,7 +826,7 @@
                 },
                 "output": {
                     "type": "string",
-                    "description": "Where to send log messages. Can be 
'stderr', 'syslog' or a file name.",
+                    "description": "Where to send log messages. Can be 
'stderr', 'stdout', 'syslog' or a file name.",
                     "update": true
                 }
             }

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/4797f4d1/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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to