Introduce a log function and apply log level. from now on the use of CommandLineHandle::log should be used from print operations

This commit is contained in:
jfmcarreira committed 2015-03-19 01:00:50 +00:00
1 parent 7a2cd6b035
commit a52012a762
6 files changed
+93 -44

No files matched your search

+13 -1
View File
@@ -23,6 +23,7 @@
*/
#include <cstring>
#include <cstdarg>
#include "CommandLineHandle.h"
#include "lib/PlaYUVerFrame.h"
#include "modules/PlaYUVerModuleIf.h"
@@ -33,7 +34,7 @@ namespace plaYUVer
CommandLineHandle::CommandLineHandle()
{
m_uiLogLevel = 0;
}
CommandLineHandle::~CommandLineHandle()
@@ -41,6 +42,17 @@ CommandLineHandle::~CommandLineHandle()
}
Void CommandLineHandle::log( UInt level, const char *fmt, ... )
{
if( level >= m_uiLogLevel )
{
std::va_list args;
va_start( args, fmt );
vfprintf( stdout, fmt, args );
va_end( args );
}
}
Int CommandLineHandle::parseToolsArgs()
{
Int iRet = 0;