You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2006/11/21 13:10:23 UTC

svn commit: r477644 - /harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp

Author: varlax
Date: Tue Nov 21 04:10:22 2006
New Revision: 477644

URL: http://svn.apache.org/viewvc?view=rev&rev=477644
Log:
Added "*" as alias to "root" logging category.

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp?view=diff&rev=477644&r1=477643&r2=477644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/parse_arguments.cpp Tue Nov 21 04:10:22 2006
@@ -448,7 +448,7 @@
     }
 } //convert_logging_category()
 
-static void set_threshold_list(char* list, LoggingLevel level, bool convert = false) {
+static void set_threshold_list(char* list, LoggingLevel level, const char* file, bool convert) {
     char *next;
     while (list) {
         if ( (next = strchr(list, ',')) ) {
@@ -456,7 +456,13 @@
         }
 
         char* category = (convert) ? convert_logging_category(list) : list;
+        if (0 == strcmp("*", category)) { //alias to root category
+            category = "root";
+        }
         set_threshold(category, level);
+        if (file) {
+            set_out(category, file);
+        }
 
         if (next) {
             *next = ',';
@@ -476,9 +482,8 @@
         char *out = strchr(next_sym, ':');
         if (out) { // -cmd:category:file
             *out = '\0';
-            set_out(next_sym, out + 1);
         }
-        set_threshold_list(next_sym, level, false);
+        set_threshold_list(next_sym, level, out ? out + 1 : NULL, false);
         if (out){
             *out = ':';
         }
@@ -527,7 +532,7 @@
                 set_threshold(util::JNI_LOGGER, INFO);
             } else if (*next_sym == ':') { // -verbose:
                 next_sym++;
-                set_threshold_list(next_sym, INFO, true); // true = convert standard categories to internal
+                set_threshold_list(next_sym, INFO, NULL, true); // true = convert standard categories to internal
             } else {
                 ECHO("Unknown option " << option << USE_JAVA_HELP);
                 LOGGER_EXIT(1);