Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

log.H File Reference


Detailed Description

Logging facility.

This is a comprehensive logging facility. Use the functions provided below to display messages to the user and/or syslog. Never use printf() or std::cout<< in your code, use the functions provided here instead.

Basic function call is [ID | C][P]L<LOGLEV>("format", args, ...)

Although macros, all functions are atomic, so 'if (bad) LERROR(bad);' is ok; also arguments that span several lines of source code are ok too. Using these functions in macros however is probably bogus: MACRO(LERROR("xx")). CAUTION: message size is limited to LBS chars (including final ''); longer messages will be cleanly truncated.

All log functions act like printf, so be careful when passing strings from outside directly as the format string for these functions, as outside strings may contain '' signs which could segfault your program! so, use LERROR("%s", unknown_string) rather than LERROR(unknown_string).

DEBUG, INFO and ERROR simply report an error. FATAL also throws an exception of class "bug" (or exits; see implementation).

Log entries will look like:

>>>>>>>>>>>>>>>>>>>> LERROR("success! %d %s", 10, "bozo")
Jan 11 07:21:26 jukebox dntwebcfgd: SockServ::check: success! 10 bozo
^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^  ^^^^^^^^  ^^^^^  ^^^^^^^^^^^^^^^^
   date/time    machine   program    class    funct     message

>>>>>>>>>>>>>>>>>>>> PLERROR("Cannot open");
Jan 11 07:21:26 jukebox dntwebcfg: Cool::check: Cannot open (Bad descriptor)
^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^  ^^^^  ^^^^^  ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
  date/time    machine   program   class funct    message    errno in clear

>>>>>>>>>>>>>>>>>>>> IDLINFO("Connected");
with '#define MYLOGID fd' and current value of fd being 10
Jan 11 07:21:26 jukebox dntwebcfgd: Cool::check:(10) Connected
^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^  ^^^^  ^^^^^  ^^  ^^^^^^^^^
   date/time    machine   program   class funct  ID   message

>>>>>>>>>>>>>>>>>>>> IDPLFATAL("Abort");
with '#define MYLOGID fd' and current value of fd being 10
Jan 11 07:21:26 jukebox dntwebcfgd: Cool::check:(10) Abort (Out of memory)
^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^  ^^^^  ^^^^^  ^^  ^^^^^  ^^^^^^^^^^^^^
   date/time    machine   program   class funct  ID   mes   errno in clear

>>>>>>>>>>>>>>>>>>>> CLERROR("success! %d %s", 10, "bozo")
Jan 11 07:21:26 jukebox dntwebcfgd: [Gabor(45)]::check: success! 10 bozo
^^^^^^^^^^^^^^^ ^^^^^^^ ^^^^^^^^^^  ^^^^^^^^^^^  ^^^^^  ^^^^^^^^^^^^^^^^
   date/time    machine   program ModelComponent funct     message

If the message starts with a '(', '[' or '{' char, no space is written between the colon following function name and the message

A last macro is provided, SHOWMEMORY(format, ...) which will display your message via LERROR, and append the total memory usage for the current process (as per the VmSize field in /proc/<pid>/status; this is useful to check for possible memory leaks). It only works under Linux and hence we have only defined it in the GNU C section here.

Definition in file log.H.

#include <exception>
#include <syslog.h>
#include <string.h>

Include dependency graph for log.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  lfatal_exception
 Type of exception that is thrown from LFATAL if (LOG_FLAGS&LFATAL_THROWS). More...

Defines

#define LBS2   64
 max size of function or file name
#define SENDLOG   MYLOG_USEID=false, MYLOG_USEP=false, sendlog
#define SENDPLOG   MYLOG_USEID=false, MYLOG_USEP=true, sendlog
#define SENDIDLOG   MYLOG_USEID=true, MYLOG_USEP=false, sendlog
#define SENDIDPLOG   MYLOG_USEID=true, MYLOG_USEP=true, sendlog
#define LDEBUG
#define LINFO
#define LERROR
#define LFATAL
#define PLDEBUG
#define PLINFO
#define PLERROR
#define PLFATAL
#define IDLDEBUG
#define IDLINFO
#define IDLERROR
#define IDLFATAL
#define IDPLDEBUG
#define IDPLINFO
#define IDPLERROR
#define IDPLFATAL
#define CLOGFILE   ("[" + descriptiveName() + "]").c_str()
#define CLDEBUG
#define CLINFO
#define CLERROR
#define CLFATAL
#define CPLDEBUG
#define CPLINFO
#define CPLERROR
#define CPLFATAL
#define REPORT_CURRENT_EXCEPTION   report_current_exception(__LINE__, __FILE__)
 Use this inside of a catch(...) to report info about the caught exception.

Functions

void sendlog (const char *msg,...) __attribute__((format(__printf__
void report_current_exception (const int line, const char *file) throw ()
 Helper function for REPORT_CURRENT_EXCEPTION macro.

Variables

const int LFATAL_THROWS = (1 << 0)
 Make LFATAL() throw a std::exception rather than abort()ing.
const int LFATAL_PRINTS_ABORT = (1 << 1)
 Make LFATAL() print " -- ABORT" after each message.
const int LFATAL_XTRA_NOISY = (1 << 2)
 Make LFATAL() print its msg to stderr/syslog AND put it in the std::exception.
const int LOG_FULLTRACE = (1 << 3)
 Whether to send log messages to stderr or to syslog.
int LOG_FLAGS
 Bitwise-or'ed combination of above flags.
int MYLOGVERB
const char * MYLOGPREFIX
 Null by default, but if set to non-null this string will be prefixed to every log message.
void char MYLOGFUN []
void char MYLOGFIL []
int MYLOGLIN
int MYLOGLEV
int MYLOGIDVAL
bool MYLOG_USEID
bool MYLOG_USEP


Define Documentation

#define CLDEBUG
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_DEBUG,SENDLOG

Definition at line 319 of file log.H.

Referenced by ModelComponent::exportOptions(), SaccadeController::getDecision(), SingleOpponentChannel::getFeatures(), SingleChannel::getFeatures(), SingleOpponentChannel::getFeaturesBatch(), SingleChannel::getFeaturesBatch(), ModelComponent::ModelComponent(), SaccadeController::resetPos(), ModelComponent::start(), BeoChip::start1(), ModelComponent::stop(), and ModelComponent::~ModelComponent().

#define CLERROR
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_ERR,SENDLOG

Definition at line 323 of file log.H.

Referenced by ModelComponent::doRequestOption(), BeoSubBallast::input(), ModelComponent::removeSubComponent(), and ModelComponent::unregisterParam().

#define CLFATAL
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_CRIT,SENDLOG

Definition at line 325 of file log.H.

Referenced by SingleChannel::centerSurround(), ThresholdFrictionSaccadeController::computeWhenNewDecision(), SingleChannel::doInput(), ModelComponent::doRequestOption(), SaccadeController::getDecision(), IntegerSimpleChannel::getFeatures(), IntegerSimpleChannel::getFeaturesBatch(), SingleChannel::getImage(), ChannelBase::getInputDims(), ModelComponent::getModelParamString(), ModelComponent::getModelParamValAux(), SingleChannel::getOutput(), IntegerSimpleChannel::getOutputInt(), SingleChannel::getRawCSmap(), IntegerSimpleChannel::getRawCSmapInt(), ModelComponent::hideOption(), IntegerChannel::inputInt(), WinnerTakeAllGreedy::integrate(), SingleChannel::pyramid(), RadioDecoder::RadioDecoder(), IntegerSimpleChannel::readFrom(), ModelComponent::readParamsFrom(), ModelComponent::removeSubComponent(), ModelComponent::reset(), RadioDecoder::run(), ModelComponent::save(), ChannelBase::setInputDims(), ModelComponent::setRealm(), ModelComponent::start(), RadioDecoder::start1(), ModelComponent::stop(), SingleChannel::storePyramid(), SingleOpponentChannel::storePyramid2(), ModelComponent::subComponent(), and IntegerSimpleChannel::writeTo().

#define CLINFO
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_INFO,SENDLOG

Definition at line 321 of file log.H.

Referenced by SaccadeController::dumpQueues(), SaccadeController::getDecision(), BeoSubBallast::input(), BeoSubBallast::mechanicalInitialize(), BeoSubTwoBal::start2(), BeoSubSim::start2(), and BeoSubOneBal::start2().

#define CPLDEBUG
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_DEBUG,SENDPLOG

Definition at line 328 of file log.H.

#define CPLERROR
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_ERR,SENDPLOG

Definition at line 332 of file log.H.

#define CPLFATAL
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_CRIT,SENDPLOG

Definition at line 334 of file log.H.

#define CPLINFO
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, CLOGFILE, LBS2-1),MYLOGLEV=LOG_INFO,SENDPLOG

Definition at line 330 of file log.H.

#define IDLDEBUG
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_DEBUG,\
SENDIDLOG

Definition at line 291 of file log.H.

Referenced by SockServ::addClient(), SockServ::check(), TCPcommunicator::contact(), SockServ::disconnect(), TCPcliServ::init(), and SockServ::~SockServ().

#define IDLERROR
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_ERR,\
SENDIDLOG

Definition at line 297 of file log.H.

Referenced by SockServ::check(), SockServ::getClientIP(), and SockServ::getClientPort().

#define IDLFATAL
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_CRIT,\
SENDIDLOG

Definition at line 300 of file log.H.

Referenced by SockServ::check(), and V4Lgrabber::start1().

#define IDLINFO
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_INFO,\
SENDIDLOG

Definition at line 294 of file log.H.

Referenced by V4Lgrabber::start1().

#define IDPLDEBUG
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_DEBUG,\
SENDIDPLOG

Definition at line 304 of file log.H.

Referenced by SockServ::check().

#define IDPLERROR
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_ERR,\
SENDIDPLOG

Definition at line 310 of file log.H.

Referenced by SockServ::check(), TCPcommunicator::contact(), TCPcliServ::init(), V4Lgrabber::start1(), and TCPcliServ::~TCPcliServ().

#define IDPLFATAL
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_CRIT,\
SENDIDPLOG

Definition at line 313 of file log.H.

Referenced by TCPcliServ::check(), V4Lgrabber::grabRaw(), V4Lgrabber::grabSingleRaw(), and V4Lgrabber::start1().

#define IDPLINFO
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
MYLOGIDVAL=MYLOGID,strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_INFO,\
SENDIDPLOG

Definition at line 307 of file log.H.

#define LBS2   64
 

max size of function or file name

Definition at line 265 of file log.H.

Referenced by sendlog().

#define LDEBUG
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_DEBUG,SENDLOG

Definition at line 273 of file log.H.

Referenced by Beobot2_GistSalLocalizerMasterI::actionUpdateBelief(), GSlocalizer::actionUpdateBelief(), buildPyrGabor(), ByteCount::ByteCount(), TCPcliServ::check(), checkDataLength(), VisualObjectMatch::checkSIFTaffine(), Environment::classifySegNum(), CMapWorkerThread::CMapWorkerThread(), InputFrame::colorFloat(), GSnavResult::combine(), RawVisualCortex::combineOutputs(), ComplexChannel::combineOutputs(), IntegerRawVisualCortex::combineOutputsInt(), IntegerComplexChannel::combineOutputsInt(), combineParamMaps(), SingleChannel::combineSubMaps(), HueChannel::combineSubMaps(), GistEstimatorStd::computeFeatureVector(), TaskRelevanceMapGistClassify::computeGistDist(), VisualObject::computeKeypoints(), SceneRec::computeLocation(), convertVideoFrameToAVFrame(), XWindow::XWinImage::createImage(), ViewPort::createMainWindow(), VisualObject::createVisualObject(), RT100::deferredRead(), RT100::deferredWrite(), density(), SaliencyMapStdOptim::depress(), SaliencyMapFast::depress(), SaliencyMapTrivial::depress(), SaliencyMapStd::depress(), ImageTk< T >::displayInstance(), SIFTChannel::doInput(), ObjDetChannel::doInput(), DirectFeedChannel::doInput(), DpxFile::DpxFile(), ImageObj< T >::dupInternalRep(), BeeSTEM_PID_Listener::event(), LeakDetectorListener::event(), BeoSubListener::event(), BeobotBeoChipListener::event(), BeoMonkeyListener::event(), MyBeoChipListener::event(), MyBeeSTEMListener::event(), SupplementaryMotorAreaI::evolve(), PrefrontalCortexI::evolve(), HippocampusI::evolve(), BeoLRF::evolve(), BeoSubAction::execute(), FfmpegPacketDecoder::FfmpegPacketDecoder(), findBoundingRect(), ScaleSpace::findKeypoints(), ImageObj< T >::freeInternalRep(), InputFrame::fromRgb(), InputFrame::fromRgbDepth(), FrameRange::fromString(), getBbmtResults(), Beobot2_GistSalLocalizerMasterI::getBeliefImage(), GSlocalizer::getBeliefImage(), RawVisualCortex::getChannelOutputMap(), SaliencyMT::getCmapRef(), BeoSubCross::getCrossCenter(), BeoSubCross::getCrossDir(), RT100ControlForm::getCurrentJointPositions(), Beobot2_GistSalLocalizerMasterI::getDisplayImage(), getDisplayImage(), TopologicalMap::getDistance(), TopologicalMap::getEdge(), EnvObjDetection::getFoa(), getFpuPrecision(), getFpuRoundingMode(), GistEstimatorStd::getGistImage(), GistEstimatorGen::getGistImage(), getIK(), ArmPlanner::getIK2(), LandmarkDB::getLenTrav(), TopologicalMap::getLocation(), TopologicalMap::getLocationFloat(), TopologicalMap::getNodeLocationsInInterval(), TopologicalMap::getNodesInInterval(), SoxChannel::getNonlinearResponse(), VisualObjectDB::getObjectMatches(), SpectralResidualChannel::getOutput(), IntegerSimpleChannel::getOutputInt(), VisualObjectMatch::getOverlapRect(), TaskRelevanceMapGistClassify::getPCAMatrix(), BeoSubPipe::getPipes(), SingleChannel::getRawCSmap(), IntegerSimpleChannel::getRawCSmapInt(), VisualObjectMatch::getSalDiff(), VisualObjectMatch::getSalDist(), Beobot2_GistSalLocalizerMasterI::getSalImage(), getSalImage(), EnvSaliencyMap::getSalmap(), getSearchCommand(), Beobot2_GistSalLocalizerMasterI::getSegmentBeliefHistogram(), GSlocalizer::getSegmentBeliefHistogram(), IntegerSimpleChannel::getSubmapInt(), getSubSum(), getSubSum2(), getSubSumGen(), getTargetPos(), dummy_namespace_to_avoid_gcc411_bug_YuvParser_C::getVideoFileInfoFromFilename(), grabCycleInit(), gzWriteFrame(), hack(), RT100::immediateRead(), RT100::immediateWrite(), WinnerTakeAllTempNote::inhibit(), WinnerTakeAllStd::inhibit(), BeoLogger::initLogFile(), Beobot2_GistSalLocalizerMasterI::initParticles(), GSlocalizer::initParticles(), SimEventsUtils::initSimEvents(), GSlocalizer::input(), DirectFeedChannel::inputPyramid(), ImageTk< T >::Instance::Instance(), RT100::interpolationMove(), Environment::load(), Landmark::loadFrom(), loadPlugin(), main(), ImageObj< T >::make(), maxNormalize(), maxNormalizeFancy(), NeoBrain::moveHeadToTarget(), MrawvDecoder::MrawvDecoder(), Landmark::numMatch(), Beobot2_GistSalLocalizerMasterI::objectUpdateBelief(), GSlocalizer::objectUpdateBelief(), HTTPClient::openConnection(), operator<<(), DirectFeedChannel::outputAvailable(), GSlocalizer::outputReady(), CmdlineOptionManager::parseCommandLineCore(), OrientationChannel::parseInteractString(), MbariResultViewer::parseSaveEventNums(), PfmParser::PfmParser(), PfzParser::PfzParser(), PixelBuffer2GenericFrame(), SimEventQueue::post(), SingleChannel::postProcessMap(), VisualCortexSurprise::postProcessOutputMap(), RawVisualCortex::postProcessOutputMap(), IntegerRawVisualCortex::postProcessOutputMap(), processDorsalResult(), processLocalizerResults(), processSplitImage(), processVentralResult(), VisualObjectMatch::prune(), BeoSubCross::pruneLines(), BeoSubBin::pruneLines(), RobotBrainComponent::publish(), BeoSubAction::pulseWidthExecute(), qapp_thread_run(), QuartzQuickTimeDecoder::QuartzQuickTimeDecoder(), QuartzQuickTimeParser::QuartzQuickTimeParser(), RT100::rawCommand(), GSnav_M_Result::read(), GSnavResult::read(), readAudioWavFile(), BufferedFrameIstream::readFrame(), Raster::ReadFrame(), QuartzQuickTimeDecoder::readFrame(), InputFrameSeries::Impl::readFrame(), Beowulf::receive(), SimEventQueue::registerSimCallbackClient(), SimEventQueue::registerSimReqHandlerClient(), SimEventQueue::request(), CmdlineOptionManager::requestOption(), CmdlineOptionManager::requestOptionAlias(), LateralGeniculateNucleusI::run(), IMU_MicroStrain_3DM_GX2::run(), GPS_USGlobalSat_EM_408::run(), GPS::run(), BeoChip::run(), BeeSTEM::run(), TCPcommunicator::run(), Beobot2_GistSalLocalizerMasterI::saveLocalizerResults(), Landmark::saveTo(), segmentObject(), segmentObjectClean(), Beobot2_GistSalLocalizerMasterI::segmentUpdateBelief(), GSlocalizer::segmentUpdateBelief(), Beowulf::send(), InputMPEGStream::setFrameNumber(), Beobot2_GistSalLocalizerMasterI::setLocation(), GSlocalizer::setLocation(), CmdlineOptionManager::setOptionValString(), LandmarkDB::setSession(), Landmark::setSessionInfo(), setupDorsalPacket(), setupVentralPacket(), segmentImageTrackMC::SITrunTrack(), Landmark::sort(), speedRampFunc(), RobotBrainServiceService::start(), IEEE1394grabber::start1(), RobotBrainComponent::start2(), AudioGrabber::start2(), submain(), templMatch(), GSlocalizer::threadCompute(), BeobotBrainMT::threadCompute(), SVMClassifier::train(), trainArm(), SceneRec::trainFeature(), CmdlineOptionManager::unRequestOption(), OutputFrameSeries::update(), InputFrameSeries::update(), QT_Navigation::updateMessage(), Beobot2_GistSalLocalizerWorkerI::updateMessage(), Beobot2_GistSalLocalizerMasterI::updateMessage(), BeoPilot::UpdateRCStatus(), ImageObj< T >::updateString(), version_init(), OptimalGainsFinder::visitComplexChannel(), OptimalGainsFinder::visitSingleChannel(), VisualObjectMatch::VisualObjectMatch(), InputHandlerThreaded::waitForOutput(), writeAudioWavFile(), BeoChip::writeByte(), BeeSTEM::writeByte(), Raster::WriteFrame(), NullOutputStream::writeFrame(), MrawvEncoder::writeFrame(), FfmpegEncoder::writeRawFrame(), UcbMpegEncoder::writeVideoFrame(), XWindow::XWindow(), XWindow::XWinImage::XWinImage(), and XWindow::~XWindow().

#define LERROR
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_ERR,SENDLOG

Definition at line 277 of file log.H.

Referenced by JetSpec::addFeature(), JetSpec::addFeatureType(), ModelComponent::Impl::addParam(), ModelComponent::addSubComponent(), BeoSubLeakDetector::advanceRel(), audiorecorder(), TestJoyStickListener::axis(), beoSubCameraName(), beoSubSideName(), BeoChip::calibToRaw(), VCC4::CameraInitialize(), CT2WSRegionTrainerForm::ChangeFrame(), Foveator::changeImage(), SingleChannelBeoServer::check(), check_acquisition(), MgzEncoder::close(), ComplexObject::ComplexObject(), BeoSubSaliency::computeCMAP(), SaliencyMT::computeCMAP(), TCPcommunicator::contact(), cudaLowPassX(), cudaLowPassY(), Raster::Display(), PsychoDisplay::displayNumbers(), SDLdisplay::displayText(), PN03contrastChannel::doInput(), downscaleFancy(), BitObject::draw(), BeoSubLeakDetector::dropMarker(), lobot::dump(), BeeSTEM_PID_Listener::event(), BeobotBeoChipListener::event(), BeoMonkeyListener::event(), MyBeoChipListener::event(), MyBeeSTEMListener::event(), RetinaI::evolve(), BeoSonar::evolve(), BeoIMU::evolve(), BeoGPS::evolve(), executeMotorCommand(), CT2WSRegionTrainerForm::fileOpen(), Serial::flush(), TCPmessage::freeMem(), GPSdata::fromString(), V2::g_x(), V2::g_y(), GaborSnake::GaborSnake(), CmdlineOptionManager::getArg(), SaliencyMT::getBias(), BinRecognizer::getBinLocation(), CrossRecognizer::getCrossLocation(), EyeTracker::getCurrentStimFile(), CmdlineOptionManager::getExtraArg(), SearchArray::getImage(), AutomateXWin::getImage(), JetSpec::getIndexA(), JetSpec::getIndexV(), SimulationViewer::getMap(), TestImages::getMaxRot(), TestImages::getNumObj(), TestImages::getNumScenes(), TestImages::getObject(), TcorrChannel::getOutput(), SingleChannel::getOutput(), IntegerSimpleChannel::getOutputInt(), getRadioStatus(), BeoPilot::getRCEnabled(), BeoPilot::getRCStatus(), VCC4::getReply(), NeoBrain::getSaliencyHisto(), TestImages::getScene(), TestImages::getSceneFilename(), BeeStem3::getSensors(), NeoBrain::getToken(), dummy_namespace_to_avoid_gcc411_bug_YuvParser_C::getVideoFileInfoFromFilename(), ImageDisplayStream::WindowMap::getWindowForFrame(), AutomateXWin::GetWindowGeometry(), VCC4::gotoPosition(), BeoSubLeakDetector::grabImage(), BeoSubSim::grabImage(), BeoSubOneBal::grabImage(), IEEE1394grabber::grabPrealloc(), XCgrabberFlex::grabRaw(), XCgrabber::grabRaw(), IEEE1394grabber::grabRaw(), QuickTimeGrabber::Impl::Impl(), inplaceLowThreshAbs(), V2::J(), BeoChip::lcdGoto(), BeoChip::lcdGotoXY(), BeoChip::lcdLoadFont(), BeeSTEM::lcdPrintf(), BeoChip::lcdSetAnimation(), KnowledgeBase::load(), BPnnet::load(), VisualObjectDB::loadFrom(), loadPlugin(), LPTFoveator::LPTFoveator(), main(), BeobotVisualCortex::masterCollect(), TCPcommunicator::nbReceived(), ModelManager::paramChanged(), XJunctionChannel::paramChanged(), CmdlineOptionManager::parseCommandLine(), SerialAdvanced::perror(), Serial::perror(), V2::phi(), SVMClassifier::predict(), dummy_namespace_to_avoid_gcc411_bug_CmdlineOptionManager_C::printFullHelp(), RobotBrainComponent::publish(), RadioDecoder::rangeCalibrate(), BeoChip::rawToCalib(), Scorbot::readArmState(), SequenceFileStream::readFrame(), ModelParamAuxImpl::readFrom(), PnmParser::Rep::readPixels16(), PnmParser::Rep::readPixels8(), Beowulf::receive(), receiveCMAPS(), TCPcommunicator::receiveIt(), BeoSub::recognizeSIFT(), RobotBrainComponent::registerSubscription(), Beowulf::releaseNode(), Beowulf::requestNode(), BeoSubQtMainForm::resetAtt_return(), lobot::LoApp::run(), JoyStick::run(), IMU_MicroStrain_3DM_GX2::run(), GPS::run(), BeoChip::run(), BeeSTEM::run(), TCPcommunicator::run(), KnowledgeBase::save(), BPnnet::save(), VisualObjectDB::saveTo(), TCPcommunicator::send(), Beowulf::send(), VCC4::SendRawCommand(), BeoSubBallast::set(), BeoSubOneBal::setBallasts(), lcd::setCursorPosition(), IMU_MicroStrain_3DM_GX2::setDataRequested(), setFpuPrecision(), setFpuRoundingMode(), BeobotAction::setGear(), BeeSTEM::setMotor(), Foveator::setOrigin(), BeeStem3::setPID(), BeoChip::setServoRaw(), BeobotAction::setSpeed(), BeobotAction::setTurn(), BeoChip::shimServos(), BeoChipMainForm::showAnalog(), BeoChipMainForm::showDin(), BeoChipMainForm::showPWM(), BeobotVisualCortex::slaveProcess(), speedRampFunc(), squash(), IEEE1394grabber::start1(), DC1394Grabber2::start1(), Staircase::stop1(), XCgrabberFlex::stop2(), XCgrabber::stop2(), IEEE1394grabber::stop2(), DC1394Grabber2::stop2(), EventLog::stop2(), EyeTrackerISCAN::stopTracking(), BeoSub::strafeRel(), submain(), SurpriseModelGG::surprise(), SurpriseMap< T >::surprise(), terminate(), TestImages::TestImages(), BeobotBrainMT::threadCompute(), EyeTracker::track(), Scorbot::tunePID(), BeoSubLeakDetector::turnOpen(), ModelManager::unRequestOption(), SaliencyModuleI::updateFrame(), BeoPilot::UpdateRCStatus(), SingleChannelBeo::waitForOutput(), BeoSub::waitMove(), SDLdisplay::waitNextRequestedFrameTime(), ParPort::WriteData(), BeoSubMotor::WritePort(), EnvObjDetection::~EnvObjDetection(), EnvSegmenterCannyContour::~EnvSegmenterCannyContour(), FFTWWrapper::~FFTWWrapper(), FourierEngine< T >::~FourierEngine(), FourierInvEngine< T >::~FourierInvEngine(), NeoBrain::~NeoBrain(), WorkThreadServer::~WorkThreadServer(), and XWinManaged::~XWinManaged().

#define LFATAL
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_CRIT,SENDLOG

Definition at line 279 of file log.H.

#define LINFO
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_INFO,SENDLOG

Definition at line 275 of file log.H.

#define PLDEBUG
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_DEBUG,SENDPLOG

Definition at line 282 of file log.H.

Referenced by V4Lgrabber::grabRaw(), and V4Lgrabber::grabSingleRaw().

#define PLERROR
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_ERR,SENDPLOG

Definition at line 286 of file log.H.

#define PLFATAL
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_CRIT,SENDPLOG

Definition at line 288 of file log.H.

#define PLINFO
 

Value:

MYLOGLIN=__LINE__,strncpy(MYLOGFUN, __FUNCTION__, LBS2-1),\
strncpy(MYLOGFIL, __FILE__, LBS2-1),MYLOGLEV=LOG_INFO,SENDPLOG

Definition at line 284 of file log.H.

#define REPORT_CURRENT_EXCEPTION   report_current_exception(__LINE__, __FILE__)
 

Use this inside of a catch(...) to report info about the caught exception.

There MUST be a current exception object in order for this to work (i.e., you must be inside of a catch block when you call REPORT_CURRENT_EXCEPTION).

Definition at line 359 of file log.H.

Referenced by PrefItemMPStr::fromString(), PrefItemMPNum< MP, T >::fromString(), main(), NeoBrain::paramChanged(), MPlayerWrapper::run(), and Streamer::run().


Function Documentation

void report_current_exception const int  line,
const char *  file
throw ()
 

Helper function for REPORT_CURRENT_EXCEPTION macro.

Definition at line 315 of file log.C.

References rutz::demangled_name(), and e.


Variable Documentation

const int LFATAL_PRINTS_ABORT = (1 << 1)
 

Make LFATAL() print " -- ABORT" after each message.

This flag is on by default.

Definition at line 131 of file log.H.

Referenced by main(), mexFunction(), and sendlog_aux().

const int LFATAL_THROWS = (1 << 0)
 

Make LFATAL() throw a std::exception rather than abort()ing.

This flag is on by default.

Definition at line 128 of file log.H.

Referenced by main(), and sendlog_aux().

const int LFATAL_XTRA_NOISY = (1 << 2)
 

Make LFATAL() print its msg to stderr/syslog AND put it in the std::exception.

This flag is on by default. Without it, LFATAL will only print its message to stderr or syslog if it will NOT be throwing a std::exception with that same message in std::exception::what().

Definition at line 137 of file log.H.

Referenced by main(), mexFunction(), and sendlog_aux().

int LOG_FLAGS
 

Bitwise-or'ed combination of above flags.

Definition at line 56 of file log.C.

Referenced by main(), mexFunction(), and sendlog().

const int LOG_FULLTRACE = (1 << 3)
 

Whether to send log messages to stderr or to syslog.

Messages are sent to stderr if the LOG_FULLTRACE flag is set in LOG_FLAGS (this is the default), or are sent to syslog if the LOG_FULLTRACE flag is not set. Executables don't need to do anything special unless they need a non-default value.

Definition at line 143 of file log.H.

Referenced by main(), mexFunction(), sendlog_aux(), and submain().

const char* MYLOGPREFIX
 

Null by default, but if set to non-null this string will be prefixed to every log message.

This can be useful if you have multiple threads or multiple processes all writing to stdout, and you want to have some way to distinguish their log messages.

Definition at line 66 of file log.C.

Referenced by handlesignal(), run_master(), run_slave(), and sendlog_aux().

int MYLOGVERB
 

Log verbosity (see <syslog.h> for possible values). Default value is LOG_DEBUG. Executables don't need to do anything special unless they need a non-default value.

Definition at line 60 of file log.C.

Referenced by BeoSubSaliency::BeoSubSaliency(), ColorTracker::ColorTracker(), ComplexChannel::combineOutputs(), RawVisualCortex::combineOutputs(), IntegerComplexChannel::combineOutputsInt(), IntegerRawVisualCortex::combineOutputsInt(), SingleChannel::combineSubMaps(), ComplexObject::ComplexObject(), RawVisualCortex::getChannelOutputMap(), SpectralResidualChannel::getOutput(), IntegerSimpleChannel::getOutputInt(), SingleChannel::getRawCSmap(), IntegerSimpleChannel::getRawCSmapInt(), IntegerSimpleChannel::getSubmapInt(), main(), BeoMap::makePanorama(), mexFunction(), ModelManager::paramChanged(), SingleChannel::postProcessMap(), dummy_namespace_to_avoid_gcc411_bug_CmdlineOptionManager_C::printFullHelp(), BeeSTEM::run(), BeoChip::run(), run_master(), run_slave(), sendlog(), RobotBrainServiceService::start(), submain(), BeeSTEM::writeByte(), and BeoChip::writeByte().


Generated on Tue Nov 3 13:29:00 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4