]> git.sesse.net Git - vlc/commitdiff
Also allow filtering based on module names.
authorAntoine Cellerier <dionoea@videolan.org>
Tue, 2 Sep 2008 00:05:22 +0000 (02:05 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Tue, 2 Sep 2008 00:05:22 +0000 (02:05 +0200)
src/libvlc-module.c
src/misc/messages.c

index 3eff29cda675793a5d46bc69307cf78fa0b1599f..a34f497216f12429daa849112a6b41135c6c33e8 100644 (file)
@@ -171,8 +171,10 @@ static const char *const ppsz_snap_formats[] =
 #define VERBOSE_OBJECTS_LONGTEXT N_( \
     "This is a ',' separated string, each objects should be prefixed by " \
     "a '+' or a '-' to respectively enable or disable it. The keyword " \
-    "'all' refers to all objects. Note, you still need to use -vvv " \
-    "to actually display debug message.")
+    "'all' refers to all objects. Objects can be refered to by their " \
+    "type or name. Rules applying to named objects take precendence " \
+    "over rules applying to object types. Note that you still need to " \
+    "use -vvv to actually display debug message.")
 
 #define QUIET_TEXT N_("Be quiet")
 #define QUIET_LONGTEXT N_( \
index 329d4709cdd6df09ab5a4c7dc741785ffa3ded12..c525ec8238d1d2e1eeebdd648a8acc8627feaf83 100644 (file)
@@ -603,13 +603,22 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
 
     psz_object = p_item->psz_object_type;
     void * val = vlc_dictionary_value_for_key( &priv->msg_enabled_objects,
-                                               psz_object );
+                                               p_item->psz_module );
     if( val == kObjectPrintingDisabled )
         return;
     if( val == kObjectPrintingEnabled )
         /* Allowed */;
-    else if( !priv->msg_all_objects_enabled )
-        return;
+    else
+    {
+        val = vlc_dictionary_value_for_key( &priv->msg_enabled_objects,
+                                            psz_object );
+        if( val == kObjectPrintingDisabled )
+            return;
+        if( val == kObjectPrintingEnabled )
+            /* Allowed */;
+        else if( !priv->msg_all_objects_enabled )
+            return;
+    }
 
     int canc = vlc_savecancel ();
 #ifdef UNDER_CE