[gjs] support GJS_DEBUG_OUTPUT=stderr to force all logging to stderr



commit aa1b6afb9e19d28db446fe204886a365db3138e4
Author: Havoc Pennington <hp pobox com>
Date:   Fri May 15 11:28:07 2009 -0400

    support GJS_DEBUG_OUTPUT=stderr to force all logging to stderr
---
 util/log.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/util/log.c b/util/log.c
index 2de116d..8b86083 100644
--- a/util/log.c
+++ b/util/log.c
@@ -135,7 +135,10 @@ gjs_debug(GjsDebugTopic topic,
 
     if (logfp == NULL) {
         const char *debug_output = g_getenv("GJS_DEBUG_OUTPUT");
-        if (debug_output != NULL) {
+        if (debug_output != NULL &&
+            strcmp(debug_output, "stderr") == 0) {
+            debug_log_enabled = TRUE;
+        } else if (debug_output != NULL) {
             const char *log_file;
             char *free_me;
             char *c;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]