INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
gbxutilacfr::Tracer Class ReferenceLocal and remote tracing. More...
Inherited by gbxutilacfr::TrivialTracer.
Detailed DescriptionLocal and remote tracing.Tracer is used to log human-readable trace statements, e.g. warnings, error messages, etc (not data). A single Tracer object is meant to be shared by multiple threads, so the implementation must be thread-safe. When the tracing message is cheap to generate, simply call one of the tracing functions. The routing to destinations will be performed internally.
//! std::string s = "something is wrong"; //! tracer->error( s ); //! If the tracing message is a result of an expensive operation, you many want to perform the tracing test yourself and then call the tracing function. You may test verbosity for specific TraceType / DestinationType combinations or use summary fields AnyTrace and ToAny.
//! Tracer* tracer = context().tracer(); //! if ( tracer.verbosity( gbxutilacfr::Tracer::ErrorTrace, gbxutilacfr::Tracer::ToAny ) > 0 ) { //! std::string s = expensiveOperation(); //! tracer.error( s ); //! } //! Enum gbxutilacfr::TraceType defines types of traced information. Enum gbxutilacfr::DestinationType defines possible tracer destinations are. Verbosity levels range from 0 (nothing) to 10 (everything). The built-in defaults are as follows: //! ToDisplay ToNetwork ToLog ToFile //! Info 1 0 0 0 //! Warning 1 0 0 0 //! Error 10 0 0 0 //! Debug 0 0 0 0 //!
Member Function Documentation
Routing is determined by DebugToXxx parameter. If localOnly is set to TRUE, messages are not sent over the network (useful when traces is caused by network errors). Reimplemented in gbxutilacfr::TrivialTracer. References debug(). Referenced by debug(), gbxsickacfr::Driver::Driver(), gbxgarminacfr::Driver::Driver(), gbxsmartbatteryacfr::OceanServerReader::read(), gbxgarminacfr::Driver::read(), gbxiceutilacfr::SafeThread::run(), and gbxsmartbatteryacfr::OceanServer::walk().
Routing is determined by ErrorToXxx parameter. If localOnly is set to TRUE, messages are not sent over the network (useful when traces is caused by network errors). Reimplemented in gbxutilacfr::TrivialTracer. References error(). Referenced by error(), gbxgarminacfr::Driver::read(), and gbxiceutilacfr::SafeThread::run().
Routing is determined by InfoToXxx parameter. If localOnly is set to TRUE, messages are not sent over the network (useful when traces is caused by network errors). Reimplemented in gbxutilacfr::TrivialTracer. References info(). Referenced by info().
LOCAL INTERFACE. Prints out verbatim to stdout. It is never routed over the network.
Implemented in gbxutilacfr::TrivialTracer.
EXPERIMENTAL. Sets debug level for an individual subsystem. Only debug-to-display is supported.
EXPERIMENTAL. Debug tracing for an individual subsystem. Only debug-to-display is supported. The maximum traceable level is set per-subsystem with setLevel().
Returns the verbosity level for traceType to destType. This test is performed internally by all tracing functions, e.g. error(). You may want to call this function yourself before calling error() if there is a significant overhead in forming the tracing string. See class documentation for an example of such usage. Implemented in gbxutilacfr::TrivialTracer.
Routing is determined by WarningToXxx parameter. If localOnly is set to TRUE, messages are not sent over the network (useful when traces is caused by network errors). Reimplemented in gbxutilacfr::TrivialTracer. References warning(). Referenced by gbxutilacfr::TrivialStatus::addSubsystem(), gbxsickacfr::Driver::Driver(), gbxnovatelacfr::Driver::read(), gbxutilacfr::TrivialStatus::removeSubsystem(), gbxsmartbatteryacfr::OceanServer::walk(), and warning().
The documentation for this class was generated from the following file: |