Changeset 821

Show
Ignore:
Timestamp:
01/04/08 17:22:21
Author:
robert
Message:

Added extra debug messages

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/applications/osgdem/osgdem.cpp

    r818 r821  
    9696        if (fileName.empty())  
    9797        { 
    98             osg::notify(osg::NOTICE)<<"Error: could not find source file \""<<sourceName<<"\""<<std::endl; 
     98 
     99            osg::notify(osg::NOTICE)<<"Error: osgdem running on \""<<vpb::getLocalHostName()<<"\", could not find source file \""<<sourceName<<"\""<<std::endl; 
     100            char str[2048];  
     101            if (getcwd( str, sizeof(str) )) 
     102            { 
     103                osg::notify(osg::NOTICE)<<"       current working directory at time of error = "<<str<<std::endl; 
     104            } 
     105            osg::setNotifyLevel(osg::DEBUG_INFO); 
     106 
     107            osg::notify(osg::NOTICE)<<"       now setting NotifyLevel to DEBUG, and re-running find:"<<std::endl; 
     108            osg::notify(osg::NOTICE)<<std::endl; 
     109            fileName = osgDB::findDataFile( sourceName); 
     110            if (!fileName.empty()) 
     111            { 
     112                osg::notify(osg::NOTICE)<<std::endl<<"Second attempt at finding source file successful!"<<std::endl<<std::endl; 
     113            } 
     114            else 
     115            { 
     116                osg::notify(osg::NOTICE)<<std::endl<<"Second attempt at finding source file also failed."<<std::endl<<std::endl; 
     117            } 
     118 
     119            osg::setNotifyLevel(osg::NOTICE); 
     120 
    99121            return 1; 
    100122        } 
     
    127149            { 
    128150                osg::notify(osg::NOTICE)<<std::endl; 
    129                 osg::notify(osg::NOTICE)<<"Second attempt to load source file \""<<sourceName<<"\" has also succeded!"<<std::endl
     151                osg::notify(osg::NOTICE)<<"Second attempt to load source file \""<<sourceName<<"\" has also succeded!"<<std::endl<<std::endl
    130152            } 
    131153            else 
    132154            { 
    133155                osg::notify(osg::NOTICE)<<std::endl; 
    134                 osg::notify(osg::NOTICE)<<"Second attempt to load source file \""<<sourceName<<"\" has also failed."<<std::endl; 
    135             } 
    136              
     156                osg::notify(osg::NOTICE)<<"Second attempt to load source file \""<<sourceName<<"\" has also failed."<<std::endl<<std::endl; 
     157            } 
     158             
     159            osg::setNotifyLevel(osg::NOTICE); 
     160 
    137161            return 1; 
    138162        }