Add usage of log macros, next files.
This commit is contained in:
@@ -205,7 +205,7 @@ aiReturn Importer::RegisterPPStep(BaseProcess* pImp)
|
||||
ASSIMP_BEGIN_EXCEPTION_REGION();
|
||||
|
||||
pimpl->mPostProcessingSteps.push_back(pImp);
|
||||
DefaultLogger::get()->info("Registering custom post-processing step");
|
||||
ASSIMP_LOG_INFO("Registering custom post-processing step");
|
||||
|
||||
ASSIMP_END_EXCEPTION_REGION(aiReturn);
|
||||
return AI_SUCCESS;
|
||||
@@ -232,7 +232,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
|
||||
|
||||
#ifdef ASSIMP_BUILD_DEBUG
|
||||
if (IsExtensionSupported(*it)) {
|
||||
DefaultLogger::get()->warn("The file extension " + *it + " is already in use");
|
||||
ASSIMP_LOG_WARN_F("The file extension ", *it, " is already in use");
|
||||
}
|
||||
#endif
|
||||
baked += *it;
|
||||
@@ -240,7 +240,7 @@ aiReturn Importer::RegisterLoader(BaseImporter* pImp)
|
||||
|
||||
// add the loader
|
||||
pimpl->mImporter.push_back(pImp);
|
||||
DefaultLogger::get()->info("Registering custom importer for these file extensions: " + baked);
|
||||
ASSIMP_LOG_INFO_F("Registering custom importer for these file extensions: ", baked);
|
||||
ASSIMP_END_EXCEPTION_REGION(aiReturn);
|
||||
return AI_SUCCESS;
|
||||
}
|
||||
@@ -260,10 +260,10 @@ aiReturn Importer::UnregisterLoader(BaseImporter* pImp)
|
||||
|
||||
if (it != pimpl->mImporter.end()) {
|
||||
pimpl->mImporter.erase(it);
|
||||
DefaultLogger::get()->info("Unregistering custom importer: ");
|
||||
ASSIMP_LOG_INFO("Unregistering custom importer: ");
|
||||
return AI_SUCCESS;
|
||||
}
|
||||
DefaultLogger::get()->warn("Unable to remove custom importer: I can't find you ...");
|
||||
ASSIMP_LOG_WARN("Unable to remove custom importer: I can't find you ...");
|
||||
ASSIMP_END_EXCEPTION_REGION(aiReturn);
|
||||
return AI_FAILURE;
|
||||
}
|
||||
@@ -283,10 +283,10 @@ aiReturn Importer::UnregisterPPStep(BaseProcess* pImp)
|
||||
|
||||
if (it != pimpl->mPostProcessingSteps.end()) {
|
||||
pimpl->mPostProcessingSteps.erase(it);
|
||||
DefaultLogger::get()->info("Unregistering custom post-processing step");
|
||||
ASSIMP_LOG_INFO("Unregistering custom post-processing step");
|
||||
return AI_SUCCESS;
|
||||
}
|
||||
DefaultLogger::get()->warn("Unable to remove custom post-processing step: I can't find you ..");
|
||||
ASSIMP_LOG_WARN("Unable to remove custom post-processing step: I can't find you ..");
|
||||
ASSIMP_END_EXCEPTION_REGION(aiReturn);
|
||||
return AI_FAILURE;
|
||||
}
|
||||
@@ -586,7 +586,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||
// a scene. In this case we need to delete the old one
|
||||
if (pimpl->mScene) {
|
||||
|
||||
DefaultLogger::get()->debug("(Deleting previous scene)");
|
||||
ASSIMP_LOG_DEBUG("(Deleting previous scene)");
|
||||
FreeScene();
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||
// not so bad yet ... try format auto detection.
|
||||
const std::string::size_type s = pFile.find_last_of('.');
|
||||
if (s != std::string::npos) {
|
||||
DefaultLogger::get()->info("File extension not known, trying signature-based detection");
|
||||
ASSIMP_LOG_INFO("File extension not known, trying signature-based detection");
|
||||
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
|
||||
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
|
||||
imp = pimpl->mImporter[a];
|
||||
@@ -648,7 +648,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||
if ( NULL != desc ) {
|
||||
ext = desc->mName;
|
||||
}
|
||||
DefaultLogger::get()->info("Found a matching importer for this file format: " + ext + "." );
|
||||
ASSIMP_LOG_INFO("Found a matching importer for this file format: " + ext + "." );
|
||||
pimpl->mProgressHandler->UpdateFileRead( 0, fileSize );
|
||||
|
||||
if (profiler) {
|
||||
@@ -744,7 +744,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
|
||||
// In debug builds: run basic flag validation
|
||||
ai_assert(_ValidateFlags(pFlags));
|
||||
DefaultLogger::get()->info("Entering post processing pipeline");
|
||||
ASSIMP_LOG_INFO("Entering post processing pipeline");
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
// The ValidateDS process plays an exceptional role. It isn't contained in the global
|
||||
@@ -768,7 +768,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
}
|
||||
#else
|
||||
if (pimpl->bExtraVerbose) {
|
||||
DefaultLogger::get()->warn("Not a debug build, ignoring extra verbose setting");
|
||||
ASSIMP_LOG_WARN("Not a debug build, ignoring extra verbose setting");
|
||||
}
|
||||
#endif // ! DEBUG
|
||||
|
||||
@@ -800,7 +800,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
|
||||
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
|
||||
if (pimpl->bExtraVerbose) {
|
||||
DefaultLogger::get()->debug("Verbose Import: re-validating data structures");
|
||||
ASSIMP_LOG_DEBUG("Verbose Import: re-validating data structures");
|
||||
|
||||
ValidateDSProcess ds;
|
||||
ds.ExecuteOnScene (this);
|
||||
@@ -820,7 +820,7 @@ const aiScene* Importer::ApplyPostProcessing(unsigned int pFlags)
|
||||
|
||||
// clear any data allocated by post-process steps
|
||||
pimpl->mPPShared->Clean();
|
||||
DefaultLogger::get()->info("Leaving post processing pipeline");
|
||||
ASSIMP_LOG_INFO("Leaving post processing pipeline");
|
||||
|
||||
ASSIMP_END_EXCEPTION_REGION(const aiScene*);
|
||||
return pimpl->mScene;
|
||||
@@ -841,7 +841,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
|
||||
}
|
||||
|
||||
// In debug builds: run basic flag validation
|
||||
DefaultLogger::get()->info( "Entering customized post processing pipeline" );
|
||||
ASSIMP_LOG_INFO( "Entering customized post processing pipeline" );
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
// The ValidateDS process plays an exceptional role. It isn't contained in the global
|
||||
@@ -864,7 +864,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
|
||||
}
|
||||
#else
|
||||
if ( pimpl->bExtraVerbose ) {
|
||||
DefaultLogger::get()->warn( "Not a debug build, ignoring extra verbose setting" );
|
||||
ASSIMP_LOG_WARN( "Not a debug build, ignoring extra verbose setting" );
|
||||
}
|
||||
#endif // ! DEBUG
|
||||
|
||||
@@ -882,7 +882,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
|
||||
|
||||
// If the extra verbose mode is active, execute the ValidateDataStructureStep again - after each step
|
||||
if ( pimpl->bExtraVerbose || requestValidation ) {
|
||||
DefaultLogger::get()->debug( "Verbose Import: revalidating data structures" );
|
||||
ASSIMP_LOG_DEBUG( "Verbose Import: revalidating data structures" );
|
||||
|
||||
ValidateDSProcess ds;
|
||||
ds.ExecuteOnScene( this );
|
||||
@@ -893,7 +893,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
|
||||
|
||||
// clear any data allocated by post-process steps
|
||||
pimpl->mPPShared->Clean();
|
||||
DefaultLogger::get()->info( "Leaving customized post processing pipeline" );
|
||||
ASSIMP_LOG_INFO( "Leaving customized post processing pipeline" );
|
||||
|
||||
ASSIMP_END_EXCEPTION_REGION( const aiScene* );
|
||||
|
||||
@@ -904,7 +904,7 @@ const aiScene* Importer::ApplyCustomizedPostProcessing( BaseProcess *rootProcess
|
||||
// Helper function to check whether an extension is supported by ASSIMP
|
||||
bool Importer::IsExtensionSupported(const char* szExtension) const
|
||||
{
|
||||
return NULL != GetImporter(szExtension);
|
||||
return nullptr != GetImporter(szExtension);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user