[vlmc-devel] VlmcLogger: Delegate initialization work to the setup method

Hugo Beauzée-Luyssen git at videolan.org
Sun Mar 9 16:25:47 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Sun Mar  9 16:18:02 2014 +0100| [011ce34be1a5adff4c4d6c6d9dfde9f40565cc76] | committer: Hugo Beauzée-Luyssen

VlmcLogger: Delegate initialization work to the setup method

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=011ce34be1a5adff4c4d6c6d9dfde9f40565cc76
---

 src/Tools/VlmcLogger.cpp |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/Tools/VlmcLogger.cpp b/src/Tools/VlmcLogger.cpp
index fb2b407..cd08db7 100644
--- a/src/Tools/VlmcLogger.cpp
+++ b/src/Tools/VlmcLogger.cpp
@@ -34,6 +34,17 @@ VlmcLogger::VlmcLogger()
     : m_logFile( NULL )
     , m_backendLogLevel( Backend::IBackend::None )
 {
+}
+
+VlmcLogger::~VlmcLogger()
+{
+    if ( m_logFile )
+        fclose( m_logFile );
+}
+
+void
+VlmcLogger::setup()
+{
     //setup log level :
     {
         SettingValue* logLevel = VLMC_CREATE_PREFERENCE( SettingValue::Int, "private/LogLevel", (int)VlmcLogger::Quiet,
@@ -94,17 +105,7 @@ VlmcLogger::VlmcLogger()
     }
     Backend::IBackend* backend = Backend::getBackend();
     backend->setLogHandler( this, &VlmcLogger::backendLogHandler );
-}
-
-VlmcLogger::~VlmcLogger()
-{
-    if ( m_logFile )
-        fclose( m_logFile );
-}
 
-void
-VlmcLogger::setup()
-{
 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
     qInstallMessageHandler( VlmcLogger::vlmcMessageHandler );
 #else



More information about the Vlmc-devel mailing list