[vlc-commits] medialib: Use a dedicated verbosity setting

Hugo Beauzée-Luyssen git at videolan.org
Mon Aug 24 13:27:51 CEST 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Jul  1 15:56:40 2020 +0200| [d9dc71bc94dd04cd8eead46f8f0149c605737404] | committer: Hugo Beauzée-Luyssen

medialib: Use a dedicated verbosity setting

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9dc71bc94dd04cd8eead46f8f0149c605737404
---

 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()



More information about the vlc-commits mailing list