simgear  3.5.0 [next] git://gitorious.org/fg/simgear.git
SimGear - Simulator Construction Tools
logstream.hxx File Reference
#include <simgear/compiler.h>
#include <simgear/debug/debug_types.h>
#include <sstream>

Go to the source code of this file.

Classes

class  logstream
 
class  simgear::LogCallback
 

Namespaces

 simgear
 Expression tree implementation.
 

Macros

#define SG_LOG(C, P, M)
 
#define SG_ORIGIN   __FILE__ ":" SG_STRINGIZE(__LINE__)
 

Functions

void simgear::requestConsole ()
 
logstreamsglog ()
 

Detailed Description

Stream based logging mechanism.

Definition in file logstream.hxx.

Macro Definition Documentation

#define SG_LOG (   C,
  P,
 
)
Value:
do { \
if(sglog().would_log(C,P)) { \
std::ostringstream os; \
os << M; \
sglog().log(C, P, __FILE__, __LINE__, os.str()); \
} \
} while(0)
static double P[13][13]
Definition: coremag.cxx:163
friend logstream & sglog()
Definition: logstream.cxx:411

Log a message.

Parameters
Cdebug class
Ppriority
Mmessage

Definition at line 133 of file logstream.hxx.

Referenced by simgear::HLAObjectClass::_deleteInstance(), simgear::HLAObjectClass::_discoverInstance(), simgear::HLAFederate::_eraseObjectInstance(), simgear::HLAFederate::_insertInteractionClass(), simgear::HLAFederate::_insertObjectClass(), simgear::HLAFederate::_insertObjectInstance(), simgear::HLAObjectClass::_registerInstance(), simgear::HLAObjectClass::_removeInstance(), simgear::HLAObjectClass::_resolveAttributeIndex(), simgear::HLAInteractionClass::_resolveParameterIndex(), simgear::HLAInteractionClass::_setRTIInteractionClass(), simgear::HLAObjectClass::_setRTIObjectClass(), simgear::RTI13Federate::_tick(), simgear::effect::ScalarChangeListener< OSGParamType, ObjType, F >::activate(), SGSubsystemMgr::add(), simgear::canvas::Canvas::addChildCanvas(), SGCloudField::addCloudToTree(), nasal::internal::GhostMetadata::addDerived(), simgear::PropertyInterpolationMgr::addEasingFunction(), simgear::canvas::Element::addEventListener(), simgear::PropertyInterpolationMgr::addInterpolatorFactory(), simgear::canvas::Canvas::addParentCanvas(), simgear::canvas::Canvas::addPlacementFactory(), SGTexturedTriangleBin::addRandomPoints(), simgear::AirportSignBuilder::addSign(), simgear::StateMachine::Transition::addSourceState(), simgear::canvas::Element::addStyle(), simgear::Particles::appendParticles(), SGText::appendText(), FindGroupVisitor::apply(), simgear::HLADataType::_DataElementIndexVisitor::apply(), simgear::canvas::Element::RelativeScissor::apply(), anonymous_namespace{SVNReportParser.cxx}::SVNDeltaWindow::apply(), simgear::HLAScalarDecodeVisitor::apply(), simgear::HLAPropertyDataElement::DataElementFactoryVisitor::apply(), simgear::HLAScalarEncodeVisitor::apply(), simgear::HLAFixedRecordDecodeVisitor::apply(), simgear::HLAFixedRecordEncodeVisitor::apply(), simgear::HLADataElementFactoryVisitor::apply(), simgear::QuadTreeCleaner::apply(), simgear::Socket::bind(), simgear::NetBufferChannel::bufferSend(), simgear::CubeMapBuilder::build(), simgear::GBufferBuilder::build(), simgear::TextureUnitBuilder::buildAttribute(), simgear::ShadeModelBuilder::buildAttribute(), simgear::CullFaceBuilder::buildAttribute(), simgear::RenderBinBuilder::buildAttribute(), simgear::UniformBuilder::buildAttribute(), simgear::PolygonOffsetBuilder::buildAttribute(), simgear::BuildLeafBVHPolicy::buildBVH(), simgear::BuildGroupBVHPolicy::buildBVH(), simgear::NoBuildBVHPolicy::buildBVH(), simgear::buildPass(), simgear::buildTechnique(), buildVasi(), SGPickAnimation::VncCallback::buttonPressed(), SGPickAnimation::VncCallback::buttonReleased(), simgear::canvas::NasalWidget::callHeightForWidthFunc(), simgear::pkg::Root::catalogRefreshComplete(), simgear::PropertyBasedMgr::childAdded(), simgear::canvas::Image::childChanged(), simgear::PropertyBasedMgr::childRemoved(), simgear::canvas::Group::childRemoved(), simgear::canvas::Element::childRemoved(), simgear::Dir::children(), SGTileDetailsCallback::computeRandomForest(), SGTileDetailsCallback::computeRandomObjectsAndBuildings(), SGTileDetailsCallback::computeRandomSurfaceLights(), simgear::HLAFederate::connect(), simgear::HTTP::Connection::connectToHost(), simgear::canvas::NasalWidget::contentsRectChanged(), simgear::Dir::create(), SGPath::create_dir(), simgear::HLAObjectInstance::createAndSetAttributeDataElement(), SGTexTransformAnimation::createAnimationGroup(), simgear::HLAObjectInstance::createAttributeDataElement(), simgear::HLAObjectInstance::createAttributeDataElements(), simgear::RTI13Federate::createFederationExecution(), simgear::HLAFederate::createFederationExecution(), simgear::pkg::Catalog::createFromPath(), simgear::RTI13Federate::createInteractionClass(), simgear::PropertyInterpolationMgr::createInterpolator(), simgear::HLAFederate::createJoinFederationExecution(), simgear::RTI13Federate::createObjectClass(), simgear::SVNReportParser::SVNReportParserPrivate::decodeTextDelta(), simgear::HLAObjectInstance::deleteInstance(), simgear::RTI13ObjectInstance::deleteObjectInstance(), simgear::RTI13Federate::destroyFederationExecution(), simgear::HLAFederate::destroyFederationExecution(), simgear::RTI13Federate::disableTimeConstrained(), simgear::HLAFederate::disableTimeConstrained(), simgear::RTI13Federate::disableTimeRegulation(), simgear::HLAFederate::disableTimeRegulation(), simgear::HLAFederate::disconnect(), simgear::RTIObjectClass::discoverInstance(), simgear::HLAObjectInstance::discoverInstance(), simgear::canvas::Layout::distribute(), simgear::canvas::Path::PathDrawable::drawImplementation(), simgear::canvas::Element::Element(), simgear::RTI13Federate::enableTimeConstrained(), simgear::HLAFederate::enableTimeConstrained(), simgear::HLAFederate::enableTimeConstrainedByLocalClock(), simgear::RTI13Federate::enableTimeRegulation(), simgear::HLAFederate::enableTimeRegulation(), simgear::HLAObjectInstance::encodeAttributeValue(), PropsVisitor::endElement(), SampleStatistic::error(), SGCommandMgr::execute(), simgear::SGTerraSync::SvnThread::fail(), simgear::pkg::Root::failedInstall(), simgear::DefaultCachePolicy::find(), FindGroupVisitor::FindGroupVisitor(), simgear::StateMachine::findStateByName(), simgear::DAVMultiStatus::finishParse(), first_unused_index(), simgear::RTI13Federate::flushQueueRequest(), simgear::HTTP::Connection::foundTerminator(), SGMaterial::get_one_effect(), SGMaterial::get_one_object_mask(), simgear::HLAOMTXmlVisitor::getArrayDataType(), simgear::HLAObjectInstance::getAttributeData(), SGTriangleInfo::getBorderContours(), simgear::getColor(), simgear::Particles::getCommonRoot(), simgear::HLAInteractionClass::getDataElementIndex(), simgear::HLAObjectClass::getDataElementIndex(), simgear::HLAObjectInstance::getDataElementIndex(), simgear::PropertyBasedElement::getDataProp(), simgear::HLAOMTXmlVisitor::getDataType(), simgear::HLAOMTXmlVisitor::getEnumeratedDataType(), simgear::HLAOMTXmlVisitor::getFixedRecordDataType(), simgear::RTI13ObjectInstance::getName(), simgear::RTI13Federate::getObjectInstance(), simgear::canvas::Group::getOrCreateChild(), simgear::canvas::Path::PathDrawable::getTransformedBounds(), simgear::UniformFactoryImpl::getUniform(), getValue(), simgear::HLAOMTXmlVisitor::getVariantRecordDataType(), simgear::HTTP::FileRequest::gotBodyData(), simgear::anonymous_namespace{SVNRepository.cxx}::UpdateReportRequest::gotBodyData(), simgear::gzContainerReader::gzContainerReader(), simgear::NetChannel::handleAccept(), simgear::NetChannel::handleError(), simgear::canvas::Element::handleEvent(), simgear::canvas::Image::handleImageLoadDone(), simgear::NetChannel::handleRead(), simgear::NetChannel::handleResolve(), simgear::HTTP::Connection::handleTimeout(), simgear::NetChannel::handleWrite(), simgear::canvas::Group::handleZIndexChanged(), simgear::HLAInteractionClass::HLAInteractionClass(), simgear::HLAObjectClass::HLAObjectClass(), SGSoundMgr::init(), SGEventMgr::init(), SGTime::init(), SGXmlSound::init(), simgear::HLAFederate::init(), simgear::SGTerraSync::SvnThread::initCompletedTilesPersistentCache(), simgear::HTTP::ContentDecoder::initWithRequest(), SGBinding::innerFire(), simgear::SVNReportParser::innerParseXML(), SGBucket::innerSet(), simgear::HLAFederate::insertDataType(), simgear::canvas::BoxLayout::insertItem(), SGTileDetailsCallback::insertPtGeometry(), SGTileGeometryBin::insertSurfaceGeometry(), SGInteractionAnimation::install(), simgear::PropertyInterpolationMgr::interpolate(), SGPropertyNode::interpolate(), simgear::RTI13ObjectInstance::isAttributeOwnedByFederate(), simgear::Socket::isNonBlockingError(), simgear::RTI13Federate::join(), simgear::HLAFederate::join(), SGStarData::load(), SGMaterialLib::load(), simgear::ReaderWriterSTG::_ModelBin::load(), SGMatModel::load_models(), simgear::canvas::Image::loadImage(), simgear::RTI13ObjectInstance::localDeleteObjectInstance(), SGTrackToAnimation::log(), anonymous_namespace{raw_socket.cxx}::Resolver::lookupHost(), main(), simgear::make3DNoiseImage(), SGSocket::make_client_socket(), SGSocket::make_server_socket(), simgear::makeEffect(), simgear::anonymous_namespace{TextureBuilder.cxx}::makeTexTuple(), simgear::pkg::Package::matches(), nasal::Ghost< T, typename boost::enable_if< is_strong_ref< T > >::type >::member(), simgear::RTI13Federate::modifyLookahead(), simgear::HLAFederate::modifyLookahead(), simgear::pkg::Catalog::Downloader::onDone(), simgear::pkg::Install::PackageArchiveDownloader::onDone(), simgear::anonymous_namespace{SVNRepository.cxx}::UpdateReportRequest::onDone(), simgear::HTTP::Request::onFail(), simgear::canvas::NasalWidget::onRemove(), SGFile::open(), SGSerial::open(), SGSocketUDP::open(), SGSocket::open(), SGSerialPort::open_port(), simgear::SGBuildingBin::AddBuildingLeafObject::operator()(), simgear::SVGpreserveAspectRatio::parse(), simgear::SVNDirectory::parseCache(), simgear::pkg::Catalog::parseProps(), simgear::DAVMultiStatus::parseXML(), SGSocket::poll(), print_openal_error(), simgear::HTTP::Connection::processHeader(), simgear::HLAFederate::processMessage(), simgear::HLAFederate::processMessages(), simgear::HTTP::Connection::processTransferEncoding(), simgear::SVNRepoPrivate::propFindFailed(), simgear::RTI13InteractionClass::publish(), simgear::RTI13ObjectClass::publish(), simgear::HLAInteractionClass::publish(), simgear::HLAObjectClass::publish(), simgear::RTI13Federate::queryFederateTime(), simgear::HLAFederate::queryFederateTime(), simgear::RTI13Federate::queryGALT(), simgear::RTI13Federate::queryLITS(), simgear::RTI13Federate::queryLookahead(), simgear::HLAFederate::queryLookahead(), SGGeodesy::radialIntersection(), SGBinding::read(), SGSocket::read(), simgear::ReaderWriterSTG::_ModelBin::read(), SGBinObject::read_bin(), SGBinObject::read_object(), SGSerialPort::read_port(), SGMaterial::read_properties(), simgear::gzContainerReader::readContainer(), simgear::gzContainerReader::readContainerHeader(), simgear::ModelRegistry::readImage(), SGSerial::readline(), SGSocket::readline(), SGReaderWriterBTG::readNode(), simgear::SGReaderWriterXML::readNode(), simgear::ReaderWriterSTG::readNode(), simgear::ReaderWriterSTG::_ModelBin::DelayLoadReadFileCallback::readNode(), readNotCondition(), simgear::HLAFederate::readRTI13ObjectModelTemplate(), simgear::HLAFederate::readRTI1516EObjectModelTemplate(), simgear::HLAFederate::readRTI1516ObjectModelTemplate(), SGPath::realpath(), SGCloudLayer::rebuild(), simgear::RTI13Federate::registerFederationSynchronizationPoint(), simgear::HLAObjectInstance::registerInstance(), simgear::RTI13ObjectClass::registerObjectInstance(), simgear::Dir::remove(), SGPath::remove(), SGSubsystemGroup::remove_subsystem(), simgear::Dir::removeChildren(), simgear::HLAObjectInstance::removeInstance(), simgear::canvas::Canvas::removePlacementFactory(), SGEventMgr::removeTask(), SGPath::rename(), SGCloudLayer::reposition(), SGSoundMgr::request_buffer(), SGSoundMgr::request_source(), simgear::RTI13ObjectInstance::requestObjectAttributeValueUpdate(), simgear::RTI13Federate::resign(), simgear::HLAFederate::resign(), simgear::HLAFederate::resignDestroyFederationExecution(), simgear::RTI13ObjectClass::resolveAttributeIndex(), simgear::HLAFederate::resolveObjectModel(), simgear::RTI13InteractionClass::resolveParameterIndex(), simgear::HTTP::FileRequest::responseHeadersComplete(), simgear::anonymous_namespace{SVNRepository.cxx}::PropFindRequest::responseHeadersComplete(), simgear::RTI13Federate::RTI13Federate(), simgear::SGTerraSync::SvnThread::runExternal(), simgear::SGTerraSync::SvnThread::runExternalSyncCommand(), simgear::SGTerraSync::SvnThread::runInternal(), simgear::strutils::sanitizePrintfFormat(), simgear::effect::ScalarChangeListener< OSGParamType, ObjType, F >::ScalarChangeListener(), simgear::HLAObjectInstance::sendAttributeValues(), SGSerialPort::set_baud(), simgear::canvas::Text::setAlignment(), simgear::anonymous_namespace{TextureBuilder.cxx}::setAttrs(), simgear::SVNDirectory::setBaseUrl(), simgear::canvas::Element::setClip(), simgear::HLAFederate::setConnectArguments(), simgear::PropertyBasedElement::setDataProp(), simgear::HLAAbstractEnumeratedDataElement::setDataType(), simgear::HLABasicDataElement::setDataType(), simgear::HLAAbstractVariantRecordDataElement::setDataType(), simgear::HLAAbstractFixedRecordDataElement::setDataType(), simgear::HLAAbstractArrayDataElement::setDataType(), simgear::HLAVariantArrayDataElement::setDataType(), simgear::HTTP::ContentDecoder::setEncoding(), simgear::HLAFederate::setFederateName(), simgear::HLAFederate::setFederateType(), simgear::HLAFederate::setFederationExecutionName(), simgear::HLAFederate::setFederationObjectModel(), simgear::canvas::Path::PathDrawable::setFill(), simgear::canvas::Canvas::setFocusElement(), simgear::HLAFederate::setLeadTime(), simgear::canvas::ODGauge::setSampling(), simgear::canvas::Path::PathDrawable::setStroke(), simgear::ColorInterpolator::setTarget(), simgear::HLAFederate::setTimeIncrement(), simgear::HLAOMTXmlVisitor::setToFederate(), simgear::Particles::setupColorComponent(), simgear::Particles::setupCounterData(), simgear::Particles::setupEndSizeData(), simgear::Particles::setupLifeData(), simgear::Particles::setupShooterSpeedData(), simgear::Particles::setupStartSizeData(), simgear::HLAFederate::setVersion(), simgear::SGBuildingBin::SGBuildingBin(), SGInterpTable::SGInterpTable(), sgLoad3DModel_internal(), SGMakeSphere(), SGMaterialAnimation::SGMaterialAnimation(), SGMatModel::SGMatModel(), SGMatModelGroup::SGMatModelGroup(), SGOceanTile(), SGReadExpression(), SGReadValueFromString(), SGSocket::SGSocket(), SGSoundSample::SGSoundSample(), sgTimeGetGMT(), SGBucket::sibling(), SGPath::standardLocation(), simgear::SGTerraSync::SvnThread::start(), SGSampleGroup::start_playing_sample(), PropsVisitor::startElement(), simgear::DAVMultiStatus::DAVMultiStatusPrivate::startElement(), simgear::pkg::Root::startNext(), simgear::RTIObjectClass::startRegistration(), simgear::canvas::Text::staticInit(), simgear::canvas::Image::staticInit(), simgear::RTIObjectClass::stopRegistration(), simgear::RTI13InteractionClass::subscribe(), simgear::HLAInteractionClass::subscribe(), simgear::RTI13ObjectClass::subscribe(), simgear::HLAObjectClass::subscribe(), simgear::RTI13Federate::synchronizationPointAchieved(), simgear::SGTerraSync::SvnThread::syncPathExternal(), simgear::Dir::tempDir(), Test::Test(), SGSoundMgr::testForALCError(), SGSampleGroup::testForALError(), SGSoundMgr::testForALError(), SGSampleGroup::testForError(), SGSoundMgr::testForError(), simgear::TiedPropertyList::Tie(), simgear::HLAFederate::timeAdvance(), simgear::HLAFederate::timeAdvanceAvailable(), simgear::HLAFederate::timeAdvanceBy(), simgear::RTI13Federate::timeAdvanceRequest(), simgear::RTI13Federate::timeAdvanceRequestAvailable(), simgear::RTI13Federate::FederateAmbassador::timeConstrainedEnabled(), simgear::RTI13Federate::FederateAmbassador::timeRegulationEnabled(), nasal::Ghost< T, typename boost::enable_if< is_strong_ref< T > >::type >::toNasal(), VncVisitor::touchStateSet(), SGPropertyNode::trace_read(), SGPropertyNode::trace_write(), simgear::HTTP::Connection::tryStartNextRequest(), simgear::RTI13InteractionClass::unpublish(), simgear::RTI13ObjectClass::unpublish(), simgear::HLAInteractionClass::unpublish(), simgear::HLAObjectClass::unpublish(), simgear::RTI13InteractionClass::unsubscribe(), simgear::HLAInteractionClass::unsubscribe(), simgear::RTI13ObjectClass::unsubscribe(), simgear::HLAObjectClass::unsubscribe(), simgear::SGTerraSync::update(), simgear::SVNRepository::update(), SGXmlSound::update(), SGSubsystemGroup::Member::update(), simgear::StateMachine::update(), SGTime::update(), simgear::RTI13ObjectInstance::updateAttributeValues(), simgear::SGTerraSync::SvnThread::updated(), simgear::canvas::Window::updateDecoration(), simgear::SVNRepoPrivate::updateFailed(), simgear::UniformFactoryImpl::updateListeners(), simgear::SGTerraSync::SvnThread::updateSyncSlot(), simgear::strutils::utf8ToLatin1(), SGMaterial::valid(), simgear::canvas::NasalWidget::visibilityChanged(), SGPickAnimation::VncCallback::VncCallback(), VncVisitor::VncVisitor(), PropsVisitor::warning(), simgear::canvas::warnTransformExpired(), SGFile::write(), SGSerial::write(), SGSocketUDP::write(), SGSocket::write(), SGBinObject::write_bin_file(), SGBinObject::write_objects(), SGSerialPort::write_port(), simgear::gzContainerWriter::writeContainerHeader(), SGAnimation::~SGAnimation(), SGMaterialCache::~SGMaterialCache(), SGMaterialLib::~SGMaterialLib(), SGTileDetailsCallback::~SGTileDetailsCallback(), and simgear::TiedPropertyList::~TiedPropertyList().

#define SG_ORIGIN   __FILE__ ":" SG_STRINGIZE(__LINE__)

Definition at line 142 of file logstream.hxx.

Function Documentation

logstream& sglog ( )
related

Return the one and only logstream instance. We use a function instead of a global object so we are assured that cerr has been initialised.

Returns
current logstream

Definition at line 411 of file logstream.cxx.

Referenced by main(), simgear::requestConsole(), SetLogLevelFixture::SetLogLevelFixture(), simgear::SGTerraSync::SGTerraSync(), Test::Test(), and simgear::SGTerraSync::~SGTerraSync().