diff --git a/src/osgDB/Archive.cpp b/src/osgDB/Archive.cpp index b7a8bab73..abd1dfe86 100644 --- a/src/osgDB/Archive.cpp +++ b/src/osgDB/Archive.cpp @@ -42,11 +42,11 @@ osgDB::Archive* osgDB::openArchive(const std::string& filename, ReaderWriter::Ar Archive::Archive() { - osg::notify(osg::INFO)<<"Archive::Archive() open"<=filename.length()) return false; if (filename.compare(0,_databasePath.length(), _databasePath)!=0) return false; @@ -160,7 +160,7 @@ bool DatabaseRevisions::isFileBlackListed(const std::string& filename) const { if ((*itr)->isFileBlackListed(filename)) { - osg::notify(osg::INFO)<<"File is black listed "<getName()<<")"<< std::endl; + //OSG_INFO << "osg::Registry::addDotOsgWrapper("<getName()<<")"<< std::endl; const DotOsgWrapper::Associates& assoc = wrapper->getAssociates(); for(DotOsgWrapper::Associates::const_iterator itr=assoc.begin(); itr!=assoc.end(); ++itr) { - //notify(INFO) << " ("<<*itr<<")"<< std::endl; + //OSG_INFO << " ("<<*itr<<")"<< std::endl; } const std::string& name = wrapper->getName(); @@ -260,7 +260,7 @@ osg::Object* DeprecatedDotOsgWrapperManager::readObjectOfType(const basic_type_w const osg::Object* proto = wrapper->getPrototype(); if (proto==NULL) { - osg::notify(osg::WARN)<<"Token "<getPrototype(); if (proto==NULL) { - osg::notify(osg::WARN)<<"Token "<readObject(cacheFileName, options); } else @@ -83,11 +83,11 @@ ReaderWriter::WriteResult FileCache::writeObject(const osg::Object& object, cons if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - OSG_NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeObject(object, cacheFileName, options); if (result.success()) { @@ -103,7 +103,7 @@ ReaderWriter::ReadResult FileCache::readImage(const std::string& originalFileNam std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - OSG_NOTIFY(osg::INFO)<<"FileCache::readImageFromCache("<readImage(cacheFileName, options); } else @@ -121,11 +121,11 @@ ReaderWriter::WriteResult FileCache::writeImage(const osg::Image& image, const s if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - OSG_NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeImage(image, cacheFileName, options); if (result.success()) { @@ -141,7 +141,7 @@ ReaderWriter::ReadResult FileCache::readHeightField(const std::string& originalF std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - OSG_NOTIFY(osg::INFO)<<"FileCache::readHeightFieldFromCache("<readHeightField(cacheFileName, options); } else @@ -159,11 +159,11 @@ ReaderWriter::WriteResult FileCache::writeHeightField(const osg::HeightField& hf if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - OSG_NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeHeightField(hf, cacheFileName, options); if (result.success()) { @@ -179,7 +179,7 @@ ReaderWriter::ReadResult FileCache::readNode(const std::string& originalFileName std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - OSG_NOTIFY(osg::INFO)<<"FileCache::readNodeFromCache("<readNode(cacheFileName, options, buildKdTreeIfRequired); } else @@ -197,11 +197,11 @@ ReaderWriter::WriteResult FileCache::writeNode(const osg::Node& node, const std: if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - OSG_NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeNode(node, cacheFileName, options); if (result.success()) { @@ -218,7 +218,7 @@ ReaderWriter::ReadResult FileCache::readShader(const std::string& originalFileNa std::string cacheFileName = createCacheFileName(originalFileName); if (!cacheFileName.empty() && osgDB::fileExists(cacheFileName)) { - OSG_NOTIFY(osg::INFO)<<"FileCache::readShaderFromCache("<readShader(cacheFileName, options); } else @@ -236,11 +236,11 @@ ReaderWriter::WriteResult FileCache::writeShader(const osg::Shader& shader, cons if (!osgDB::fileExists(path) && !osgDB::makeDirectory(path)) { - OSG_NOTIFY(osg::NOTICE)<<"Could not create cache directory: "<writeShader(shader, cacheFileName, options); if (result.success()) { @@ -311,12 +311,12 @@ bool FileCache::removeFileFromBlackListed(const std::string& originalFileName) c bool FileCache::loadDatabaseRevisionsForFile(const std::string& originalFileName) { - OSG_NOTIFY(osg::INFO)<<"FileCache::loadDatabaseRevisionsForFile("< dr_local; @@ -328,11 +328,11 @@ bool FileCache::loadDatabaseRevisionsForFile(const std::string& originalFileName ritr != _databaseRevisionsList.end() && !dr_local; ++ritr) { - OSG_NOTIFY(osg::INFO)<<" comparing "<<(*ritr)->getName()<<" to "<getName()<<" to "<getName()==revisionsFileName) { - OSG_NOTIFY(osg::INFO)<<"Already loaded"< object = osgDB::readObjectFile(cacheFileName); dr_local = dynamic_cast(object.get()); if (dr_local) { - OSG_NOTIFY(osg::INFO)<<" loaded local revisions File("<getDatabaseRevision(i); DatabaseRevision* revision_remote = dr_remote->getDatabaseRevision(i); - OSG_NOTIFY(osg::INFO)<<" Comparing local "<getName()<<" to remote "<getName()<getName()<<" to remote "<getName()<getName()!=revision_remote->getName()) break; } needToWriteRevisionsFileToDisk = (i!=dr_local->getDatabaseRevisionList().size()); - OSG_NOTIFY(osg::INFO)<<"Local and remote revisions are different "<getName()<getName()<get(); - OSG_NOTIFY(osg::INFO)<<" now loaded DatabaseRevisions "<getName()<<" FileList contents"<getName()<<" FileList contents"<getFilesAdded()) { FileList* fileList = readFileList(osgDB::concatPaths(revision->getDatabasePath(), revision->getFilesAdded()->getName())); @@ -450,7 +450,7 @@ bool FileCache::loadDatabaseRevisionsForFile(const std::string& originalFileName } else { - OSG_NOTIFY(osg::NOTICE)<<" failed to read revisions File, object.get()="<getName()<getName()<(object.get()); if (fileList) { - OSG_NOTIFY(osg::INFO)<<" loadeded FileList from remote system "<getName()<getName()<getName()<getName()<empty() ? filename : concatPaths(*itr, filename); path = getRealPath(path); - OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath() : trying " << path << " ...\n"; + OSG_DEBUG << "FindFileInPath() : trying " << path << " ...\n"; if(fileExists(path)) { - OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath() : USING " << path << "\n"; + OSG_DEBUG << "FindFileInPath() : USING " << path << "\n"; return path; } #ifndef WIN32 @@ -389,7 +389,7 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st realFileName = getSimpleFileName(fileName); } - OSG_NOTIFY(osg::DEBUG_INFO) << "findFileInDirectory() : looking for " << realFileName << " in " << realDirName << "...\n"; + OSG_DEBUG << "findFileInDirectory() : looking for " << realFileName << " in " << realDirName << "...\n"; if (realDirName.empty()) { @@ -534,21 +534,21 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std { if (source.empty() || destination.empty()) { - OSG_NOTIFY(osg::INFO) << "copyFile(): Empty file name." << std::endl; + OSG_INFO << "copyFile(): Empty file name." << std::endl; return FileOpResult::BAD_ARGUMENT; } // Check if source and destination are the same if (source == destination || osgDB::getRealPath(source) == osgDB::getRealPath(destination)) { - OSG_NOTIFY(osg::INFO) << "copyFile(): Source and destination point to the same file: source=" << source << ", destination=" << destination << std::endl; + OSG_INFO << "copyFile(): Source and destination point to the same file: source=" << source << ", destination=" << destination << std::endl; return FileOpResult::SOURCE_EQUALS_DESTINATION; } // Check if source file exists if (!osgDB::fileExists(source)) { - OSG_NOTIFY(osg::INFO) << "copyFile(): Source file does not exist: " << source << std::endl; + OSG_INFO << "copyFile(): Source file does not exist: " << source << std::endl; return FileOpResult::SOURCE_MISSING; } @@ -556,21 +556,21 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std osgDB::ifstream fin(source.c_str(), std::ios::in | std::ios::binary); if (!fin) { - OSG_NOTIFY(osg::NOTICE) << "copyFile(): Can't read source file: " << source << std::endl; + OSG_NOTICE << "copyFile(): Can't read source file: " << source << std::endl; return FileOpResult::SOURCE_NOT_OPENED; // Return success since it's not an output error. } // Ensure the directory exists or else the FBX SDK will fail if (!osgDB::makeDirectoryForFile(destination)) { - OSG_NOTIFY(osg::INFO) << "Can't create directory for file '" << destination << "'. Copy may fail creating the file." << std::endl; + OSG_INFO << "Can't create directory for file '" << destination << "'. Copy may fail creating the file." << std::endl; } // Open destination file osgDB::ofstream fout(destination.c_str(), std::ios::out | std::ios::binary | std::ios::trunc); if (!fout) { - OSG_NOTIFY(osg::NOTICE) << "copyFile(): Can't write destination file: " << destination << std::endl; + OSG_NOTICE << "copyFile(): Can't write destination file: " << destination << std::endl; return FileOpResult::DESTINATION_NOT_OPENED; } @@ -585,13 +585,13 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std if (!fout.good()) { - OSG_NOTIFY(osg::NOTICE) << "copyFile(): Error writing destination file: " << destination << std::endl; + OSG_NOTICE << "copyFile(): Error writing destination file: " << destination << std::endl; return FileOpResult::WRITE_ERROR; } if (!fin.eof()) { - OSG_NOTIFY(osg::NOTICE) << "copyFile(): Error reading source file: " << source << std::endl; + OSG_NOTICE << "copyFile(): Error reading source file: " << source << std::endl; return FileOpResult::READ_ERROR; } @@ -687,7 +687,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - OSG_NOTIFY(osg::WARN) << "Could not get application directory " + OSG_WARN << "Could not get application directory " "using Win32 API. It will not be searched." << std::endl; } @@ -717,14 +717,14 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - OSG_NOTIFY(osg::WARN) << "Could not get dll directory " + OSG_WARN << "Could not get dll directory " "using Win32 API. It will not be searched." << std::endl; } FreeLibrary(thisModule); } else { - OSG_NOTIFY(osg::WARN) << "Could not get dll module handle " + OSG_WARN << "Could not get dll module handle " "using Win32 API. Dll directory will not be searched." << std::endl; } } @@ -742,7 +742,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - OSG_NOTIFY(osg::WARN) << "Could not get system directory using " + OSG_WARN << "Could not get system directory using " "Win32 API, using default directory." << std::endl; convertStringPathIntoFilePathList("C:\\Windows\\System32", filepath); @@ -763,7 +763,7 @@ osgDB::FileOpResult::Value osgDB::copyFile(const std::string & source, const std } else { - OSG_NOTIFY(osg::WARN) << "Could not get Windows directory using " + OSG_WARN << "Could not get Windows directory using " "Win32 API, using default directory." << std::endl; convertStringPathIntoFilePathList("C:\\Windows", filepath); convertStringPathIntoFilePathList("C:\\Windows\\System", filepath); diff --git a/src/osgDB/ImagePager.cpp b/src/osgDB/ImagePager.cpp index 23a77759f..eedcf6507 100644 --- a/src/osgDB/ImagePager.cpp +++ b/src/osgDB/ImagePager.cpp @@ -150,7 +150,7 @@ int ImagePager::ImageThread::cancel() { // commenting out debug info as it was cashing crash on exit, presumable // due to osg::notify or std::cout destructing earlier than this destructor. - // osg::notify(osg::DEBUG_INFO)<<"Waiting for DatabasePager to cancel"< read_queue; @@ -232,7 +232,7 @@ void ImagePager::ImageThread::run() } while (!testCancel() && !_done); - osg::notify(osg::INFO)<<"ImagePager::ImageThread::done()"< request = new ImageRequest; request->_timeToMergeBy = timeToMergeBy; @@ -329,7 +329,7 @@ void ImagePager::requestImageFile(const std::string& fileName,osg::Object* attac bool ImagePager::requiresUpdateSceneGraph() const { - //osg::notify(osg::NOTICE)<<"ImagePager::requiresUpdateSceneGraph()"<_requestList.empty()); } @@ -350,7 +350,7 @@ void ImagePager::updateSceneGraph(const osg::FrameStamp&) } else { - osg::notify(osg::NOTICE)<<"ImagePager::updateSceneGraph() : error, image request attachment type not handled yet."<getObjectWrapperManager()->findWrapper( className ); if ( !wrapper ) { - osg::notify(osg::WARN) << "InputStream::readObject(): Unsupported wrapper class " + OSG_WARN << "InputStream::readObject(): Unsupported wrapper class " << className << std::endl; advanceToCurrentEndBracket(); return NULL; @@ -571,7 +571,7 @@ osg::Object* InputStream::readObject( osg::Object* existingObj ) ObjectWrapper* assocWrapper = Registry::instance()->getObjectWrapperManager()->findWrapper(*itr); if ( !assocWrapper ) { - osg::notify(osg::WARN) << "InputStream::readObject(): Unsupported associated class " + OSG_WARN << "InputStream::readObject(): Unsupported associated class " << *itr << std::endl; continue; } @@ -643,7 +643,7 @@ InputStream::ReadType InputStream::start( InputIterator* inIterator ) // Check file version if ( version!=PLUGIN_VERSION ) { - osg::notify(osg::WARN) << "InputStream: Input data version " << version + OSG_WARN << "InputStream: Input data version " << version << " may be incompatible with current reader version " << PLUGIN_VERSION << std::endl; } @@ -665,7 +665,7 @@ void InputStream::decompress() BaseCompressor* compressor = Registry::instance()->getObjectWrapperManager()->findCompressor(compressorName); if ( !compressor ) { - osg::notify(osg::WARN) << "InputStream::decompress(): No such compressor " + OSG_WARN << "InputStream::decompress(): No such compressor " << compressorName << std::endl; } @@ -694,7 +694,7 @@ void InputStream::setWrapperSchema( const std::string& name, const std::string& ObjectWrapper* wrapper = Registry::instance()->getObjectWrapperManager()->findWrapper(name); if ( !wrapper ) { - osg::notify(osg::WARN) << "InputStream::setSchema(): Unsupported wrapper class " + OSG_WARN << "InputStream::setSchema(): Unsupported wrapper class " << name << std::endl; return; } diff --git a/src/osgDB/ObjectWrapper.cpp b/src/osgDB/ObjectWrapper.cpp index ba77842ba..58766dc28 100644 --- a/src/osgDB/ObjectWrapper.cpp +++ b/src/osgDB/ObjectWrapper.cpp @@ -98,7 +98,7 @@ bool ObjectWrapper::read( InputStream& is, osg::Object& obj ) itr!=_serializers.end(); ++itr ) { if ( (*itr)->read(is, obj) ) continue; - osg::notify(osg::WARN) << "ObjectWrapper::read(): Error reading property " + OSG_WARN << "ObjectWrapper::read(): Error reading property " << _name << "::" << (*itr)->getName() << std::endl; readOK = false; } @@ -112,7 +112,7 @@ bool ObjectWrapper::write( OutputStream& os, const osg::Object& obj ) itr!=_serializers.end(); ++itr ) { if ( (*itr)->write(os, obj) ) continue; - osg::notify(osg::WARN) << "ObjectWrapper::write(): Error writing property " + OSG_WARN << "ObjectWrapper::write(): Error writing property " << _name << "::" << (*itr)->getName() << std::endl; writeOK = false; } @@ -131,7 +131,7 @@ bool ObjectWrapper::readSchema( const StringList& properties ) { if ( serializersSizegetName() ); if ( itr!=_wrappers.end() ) { - osg::notify(osg::WARN) << "ObjectWrapperManager::addWrapper(): '" << wrapper->getName() + OSG_WARN << "ObjectWrapperManager::addWrapper(): '" << wrapper->getName() << "' already exists." << std::endl; } _wrappers[wrapper->getName()] = wrapper; @@ -480,7 +480,7 @@ void ObjectWrapperManager::addCompressor( BaseCompressor* compressor ) CompressorMap::iterator itr = _compressors.find( compressor->getName() ); if ( itr!=_compressors.end() ) { - osg::notify(osg::WARN) << "ObjectWrapperManager::addCompressor(): '" << compressor->getName() + OSG_WARN << "ObjectWrapperManager::addCompressor(): '" << compressor->getName() << "' already exists." << std::endl; } _compressors[compressor->getName()] = compressor; diff --git a/src/osgDB/Output.cpp b/src/osgDB/Output.cpp index a076d0b96..de851e57b 100644 --- a/src/osgDB/Output.cpp +++ b/src/osgDB/Output.cpp @@ -194,13 +194,13 @@ std::string Output::getFileNameForOutput(const std::string& filename) const case(FULL_PATH): { // need to think about how best to implement this first... - osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support FULL_PATH yet."<< std::endl; + OSG_WARN<<"Warning: Output::getFileNameForOutput() does not support FULL_PATH yet."<< std::endl; return filename; } case(RELATIVE_PATH): { // need to think about how best to implement this as well... - osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support RELATIVE_PATH yet."<< std::endl; + OSG_WARN<<"Warning: Output::getFileNameForOutput() does not support RELATIVE_PATH yet."<< std::endl; return filename; } case(FILENAME_ONLY): diff --git a/src/osgDB/OutputStream.cpp b/src/osgDB/OutputStream.cpp index 40ab99930..4d87b63e2 100644 --- a/src/osgDB/OutputStream.cpp +++ b/src/osgDB/OutputStream.cpp @@ -58,7 +58,7 @@ OutputStream::OutputStream( const osgDB::Options* options ) else if ( keyAndValues[1]=="WriteOut" ) _writeImageHint = WRITE_EXTERNAL_FILE; } else - osg::notify(osg::WARN) << "OutputStream: Unknown option " << option << std::endl; + OSG_WARN << "OutputStream: Unknown option " << option << std::endl; } } } @@ -321,11 +321,11 @@ void OutputStream::writeImage( const osg::Image* img ) if ( decision==IMAGE_WRITE_OUT || _writeImageHint==WRITE_EXTERNAL_FILE ) { bool result = osgDB::writeImageFile( *img, img->getFileName() ); - osg::notify(osg::NOTICE) << "OutputStream::writeImage(): Write image data to external file " + OSG_NOTICE << "OutputStream::writeImage(): Write image data to external file " << img->getFileName() << std::endl; if ( !result ) { - osg::notify(osg::WARN) << "OutputStream::writeImage(): Failed to write " + OSG_WARN << "OutputStream::writeImage(): Failed to write " << img->getFileName() << std::endl; } } @@ -384,7 +384,7 @@ void OutputStream::writeImage( const osg::Image* img ) } else { - osg::notify(osg::WARN) << "OutputStream::writeImage(): Failed to open image file " + OSG_WARN << "OutputStream::writeImage(): Failed to open image file " << img->getFileName() << std::endl; *this << (unsigned int)0; } @@ -416,7 +416,7 @@ void OutputStream::writeObject( const osg::Object* obj ) ObjectWrapper* wrapper = Registry::instance()->getObjectWrapperManager()->findWrapper( name ); if ( !wrapper ) { - osg::notify(osg::WARN) << "OutputStream::writeObject(): Unsupported wrapper class " + OSG_WARN << "OutputStream::writeObject(): Unsupported wrapper class " << name << std::endl; *this << END_BRACKET << std::endl; return; @@ -430,7 +430,7 @@ void OutputStream::writeObject( const osg::Object* obj ) ObjectWrapper* assocWrapper = Registry::instance()->getObjectWrapperManager()->findWrapper(assocName); if ( !assocWrapper ) { - osg::notify(osg::WARN) << "OutputStream::writeObject(): Unsupported associated class " + OSG_WARN << "OutputStream::writeObject(): Unsupported associated class " << assocName << std::endl; continue; } @@ -494,7 +494,7 @@ void OutputStream::start( OutputIterator* outIterator, OutputStream::WriteType t BaseCompressor* compressor = Registry::instance()->getObjectWrapperManager()->findCompressor(_compressorName); if ( !compressor ) { - osg::notify(osg::WARN) << "OutputStream::start(): No such compressor " + OSG_WARN << "OutputStream::start(): No such compressor " << _compressorName << std::endl; _compressorName.clear(); } diff --git a/src/osgDB/ReadFile.cpp b/src/osgDB/ReadFile.cpp index 043c2d8ce..b32263b7d 100644 --- a/src/osgDB/ReadFile.cpp +++ b/src/osgDB/ReadFile.cpp @@ -33,7 +33,7 @@ Object* osgDB::readObjectFile(const std::string& filename,const Options* options { ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename,options); if (rr.validObject()) return rr.takeObject(); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -42,7 +42,7 @@ Image* osgDB::readImageFile(const std::string& filename,const Options* options) { ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename,options); if (rr.validImage()) return rr.takeImage(); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -50,7 +50,7 @@ Shader* osgDB::readShaderFile(const std::string& filename,const Options* options { ReaderWriter::ReadResult rr = Registry::instance()->readShader(filename,options); if (rr.validShader()) return rr.takeShader(); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -59,7 +59,7 @@ HeightField* osgDB::readHeightFieldFile(const std::string& filename,const Option { ReaderWriter::ReadResult rr = Registry::instance()->readHeightField(filename,options); if (rr.validHeightField()) return rr.takeHeightField(); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -138,7 +138,7 @@ Node* osgDB::readNodeFiles(osg::ArgumentParser& arguments,const Options* options if (image->isImageTranslucent()) { - osg::notify()<<"Image "<getFileName()<<" is translucent; setting up blending."<getFileName()<<" is translucent; setting up blending."<getOrCreateStateSet()->setMode(GL_BLEND, osg::StateAttribute::ON); geode->getOrCreateStateSet()->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); } @@ -254,7 +254,7 @@ osg::ref_ptr osgDB::readRefObjectFile(const std::string& filename,c { ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename,options); if (rr.validObject()) return osg::ref_ptr(rr.getObject()); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -262,7 +262,7 @@ osg::ref_ptr osgDB::readRefImageFile(const std::string& filename,con { ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename,options); if (rr.validImage()) return osg::ref_ptr(rr.getImage()); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -270,7 +270,7 @@ osg::ref_ptr osgDB::readRefShaderFile(const std::string& filename,c { ReaderWriter::ReadResult rr = Registry::instance()->readShader(filename,options); if (rr.validShader()) return osg::ref_ptr(rr.getShader()); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -278,7 +278,7 @@ osg::ref_ptr osgDB::readRefHeightFieldFile(const std::string& { ReaderWriter::ReadResult rr = Registry::instance()->readHeightField(filename,options); if (rr.validHeightField()) return osg::ref_ptr(rr.getHeightField()); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } @@ -286,6 +286,6 @@ osg::ref_ptr osgDB::readRefNodeFile(const std::string& filename,const { ReaderWriter::ReadResult rr = Registry::instance()->readNode(filename,options); if (rr.validNode()) return osg::ref_ptr(rr.getNode()); - if (rr.error()) notify(WARN) << rr.message() << std::endl; + if (rr.error()) OSG_WARN << rr.message() << std::endl; return NULL; } diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 8c95e73b1..398f4b47d 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -174,7 +174,7 @@ Registry* Registry::instance(bool erase) Registry::Registry() { // comment out because it was causing problems under OSX - causing it to crash osgconv when constructing ostream in osg::notify(). - // notify(INFO) << "Constructing osg::Registry"< lock(_pluginMutex); _dlList.clear(); } @@ -837,7 +837,7 @@ std::string Registry::findDataFileImplementation(const std::string& filename, co if(fileExists(filename)) { - OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl; + OSG_DEBUG << "FindFileInPath(" << filename << "): returning " << filename << std::endl; return filename; } @@ -864,7 +864,7 @@ std::string Registry::findDataFileImplementation(const std::string& filename, co if(fileExists(simpleFileName)) { - OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl; + OSG_DEBUG << "FindFileInPath(" << filename << "): returning " << filename << std::endl; return simpleFileName; } @@ -899,7 +899,7 @@ std::string Registry::findLibraryFileImplementation(const std::string& filename, if(fileExists(filename)) { - OSG_NOTIFY(osg::DEBUG_INFO) << "FindFileInPath(" << filename << "): returning " << filename << std::endl; + OSG_DEBUG << "FindFileInPath(" << filename << "): returning " << filename << std::endl; return filename; } @@ -932,9 +932,9 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor) std::string::size_type endArchive = positionArchive + archiveExtension.length(); std::string archiveName( readFunctor._filename.substr(0,endArchive)); std::string fileName(readFunctor._filename.substr(endArchive+1,std::string::npos)); - OSG_NOTIFY(osg::INFO)<<"Contains archive : "<status()==ReaderWriter::ReadResult::ERROR_IN_READING_FILE) { - // OSG_NOTIFY(osg::NOTICE)<<"Warning: error reading file \""<status()==ReaderWriter::ReadResult::FILE_NOT_FOUND) { - //OSG_NOTIFY(osg::NOTICE)<<"Warning: could not find file \""<status()==ReaderWriter::ReadResult::ERROR_IN_READING_FILE) { - // OSG_NOTIFY(osg::NOTICE)<<"Warning: error reading file \""<status()==ReaderWriter::ReadResult::FILE_NOT_FOUND) { - // OSG_NOTIFY(osg::NOTICE)<<"Warning: could not find file \""<tick(); ReaderWriter::ReadResult result = readImplementation(ReadNodeFunctor(fileName, options),Options::CACHE_NODES); osg::Timer_t endTick = osg::Timer::instance()->tick(); - OSG_NOTIFY(osg::NOTICE)<<"time to load "<delta_m(startTick, endTick)<<"ms"<delta_m(startTick, endTick)<<"ms"<writeObject( object, filename, options ); - if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl; + if (wr.error()) OSG_WARN << "Error writing file " << filename << ": " << wr.message() << std::endl; return wr.success(); } @@ -35,7 +35,7 @@ bool osgDB::writeObjectFile(const Object& object,const std::string& filename, co bool osgDB::writeImageFile(const Image& image,const std::string& filename, const Options* options ) { ReaderWriter::WriteResult wr = Registry::instance()->writeImage( image, filename, options ); - if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl; + if (wr.error()) OSG_WARN << "Error writing file " << filename << ": " << wr.message() << std::endl; return wr.success(); } @@ -43,21 +43,21 @@ bool osgDB::writeImageFile(const Image& image,const std::string& filename, const bool osgDB::writeHeightFieldFile(const HeightField& HeightField,const std::string& filename, const Options* options ) { ReaderWriter::WriteResult wr = Registry::instance()->writeHeightField( HeightField, filename, options ); - if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl; + if (wr.error()) OSG_WARN << "Error writing file " << filename << ": " << wr.message() << std::endl; return wr.success(); } bool osgDB::writeNodeFile(const Node& node,const std::string& filename, const Options* options ) { ReaderWriter::WriteResult wr = Registry::instance()->writeNode( node, filename, options ); - if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl; + if (wr.error()) OSG_WARN << "Error writing file " << filename << ": " << wr.message() << std::endl; return wr.success(); } bool osgDB::writeShaderFile(const Shader& shader,const std::string& filename, const Options* options ) { ReaderWriter::WriteResult wr = Registry::instance()->writeShader( shader, filename, options ); - if (wr.error()) notify(WARN) << "Error writing file " << filename << ": " << wr.message() << std::endl; + if (wr.error()) OSG_WARN << "Error writing file " << filename << ": " << wr.message() << std::endl; return wr.success(); } diff --git a/src/osgDB/XmlParser.cpp b/src/osgDB/XmlParser.cpp index 5b87c2ec7..57c466a86 100644 --- a/src/osgDB/XmlParser.cpp +++ b/src/osgDB/XmlParser.cpp @@ -29,7 +29,7 @@ XmlNode* osgDB::readXmlFile(const std::string& filename,const Options* options) if (!input) { - osg::notify(osg::NOTICE)<<"Could not open XML file: "<contents = input.substr(0, end); if (end!=std::string::npos) { - osg::notify(osg::INFO)<<"Valid Comment record ["<contents<<"]"<contents<<"]"<contents<<"]"<contents<<"]"<contents = input.substr(0, end); if (end!=std::string::npos) { - osg::notify(osg::INFO)<<"Valid infomation record ["<contents<<"]"<contents<<"]"<contents<<"]"<contents<<"]"<properties[option] = value; } } @@ -301,18 +301,18 @@ bool XmlNode::read(Input& input) { ++input; - osg::notify(osg::INFO)<<"Valid tag ["<name<<"]"<name<<"]"<=0 && c=='>') { ++input; - osg::notify(osg::INFO)<<"tag is closed correctly"<type = ATOM; } else - osg::notify(osg::NOTICE)<<"Error: tag is not closed correctly"<name<<"]"<name<<"]"<