[vlc-devel] [PATCH 4/6] medialib: Use a dedicated verbosity setting

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Aug 21 08:15:11 CEST 2020


---
 modules/misc/medialibrary/medialib.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/misc/medialibrary/medialib.cpp b/modules/misc/medialibrary/medialib.cpp
index 8eb4a624dc..b0355b89c1 100644
--- a/modules/misc/medialibrary/medialib.cpp
+++ b/modules/misc/medialibrary/medialib.cpp
@@ -381,8 +381,8 @@ MediaLibrary::MediaLibrary( vlc_medialibrary_module_t* ml )
     m_ml.reset( NewMediaLibrary() );
 
     m_logger.reset( new Logger( VLC_OBJECT( m_vlc_ml ) ) );
-    m_ml->setVerbosity( var_InheritInteger( VLC_OBJECT( m_vlc_ml ), "verbose" ) >= 4 ?
-                          medialibrary::LogLevel::Debug : medialibrary::LogLevel::Info );
+    m_ml->setVerbosity( var_InheritBool( VLC_OBJECT( m_vlc_ml ), "ml-verbose" ) ?
+                          medialibrary::LogLevel::Debug : medialibrary::LogLevel::Warning );
     m_ml->setLogger( m_logger.get() );
 }
 
@@ -1713,6 +1713,8 @@ static void Close( vlc_object_t* obj )
 #define ML_FOLDER_LONGTEXT _( "Semicolon separated list of folders to discover " \
                               "media from" )
 
+#define ML_VERBOSE _( "Extra verbose media library logs" )
+
 vlc_module_begin()
     set_shortname(N_("media library"))
     set_description(N_( "Organize your media" ))
@@ -1721,4 +1723,5 @@ vlc_module_begin()
     set_capability("medialibrary", 100)
     set_callbacks(Open, Close)
     add_string( "ml-folders", nullptr, ML_FOLDER_TEXT, ML_FOLDER_LONGTEXT, false )
+    add_bool( "ml-verbose", false, ML_VERBOSE, ML_VERBOSE, false )
 vlc_module_end()
-- 
2.20.1



More information about the vlc-devel mailing list