// -*- C++ -*- namespace Hurricane { /*! \class DebugSession * \brief Enable/Disable trace information (\c API). * * DebugSession provide a way to control what and when text send through the * cdebug stream is printed. cdebug display selectively the trace/debug messages * between a \c minLevel and a \c maxLevel : \f[ minLevel \leq level < maxLevel \f] * * DebugSession manage a stack of \c (min,max) pairs so multiple session * can be opened. On opening a new session the \c (min,max) pair is * pushed on the top of the stack and define the active range of trace * levels. On closing, the pair is removed from the top and the previous * range became active again. Do not forget to match any opening with a * closing. * * In addition to the levels, a DebugSession also can be triggered by a * \e symbol (i.e. a \c (void*) pointer). The DebugSession has contains * a user managed table of symbols. When, in opening a session, you give * a symbol, the session will actually changes the trace levels only if * the symbol is in the internal table. Otherwise a session is still * opened \e but it will keep the current trace levels. So, in any case * the session must be closed. * * * \section secTraceLevels Trace Levels * * * To avoid mixing messages between different parts of the software, * the following allotments have been done: * *
* * *
Trace/Debug level allotments (provisional)
\b C++ / Coriolis *
\b Tool/Library \b Minimum \b Maximum *
Hurricane \c 0 \c 19 *
CRL Core \c 100 \c 110 *
Anabatic \c 110 \c 120 *
Etesian \c 120 \c 130 *
Knik \c 130 \c 140 *
Katabatic \c 140 \c 150 *
Kite \c 150 \c 160 *
Solstice \c 160 \c 170 *
Equinox \c 170 \c 180 *
Unicorn \c 180 \c 190 *
\b C++ / CHAMS *
\b Tool/Library \b Minimum \b Maximum *
HurricaneAMS \c 500 \c 510 *
amsCore \c 510 \c 520 *
Pharos \c 520 \c 530 *
Isis \c 530 \c 540 *
Horus \c 530 \c 540 *
\b Python Wrappers / Coriolis *
\b Tool/Library \b Minimum \b Maximum *
Isobar \c 20 \c 30 *
CRL Core/Python \c 30 \c 32 *
Anabatic/Python \c 32 \c 34 *
Etesian/Python \c 34 \c 36 *
Knik/Python \c 36 \c 38 *
Katabatic/Python \c 38 \c 40 *
Kite/Python \c 40 \c 42 *
Solstice/Python \c 42 \c 44 *
Equinox/Python \c 44 \c 46 *
Unicorn/Python \c 46 \c 48 *
\b Python Wrappers / CHAMS *
\b Tool/Library \b Minimum \b Maximum *
isobarAMS \c 48 \c 50 *
amsCore \c 50 \c 51 *
Pharos/Python \c 52 \c 60 *
Isis/Python \c 60 \c 61 *
Horus/Python \c 61 \c 62 *
\b Special levels *
Determinim check \c 9000 \c 9001 *
JSON parsers/drivers\c 19 \c 20 *
*
*/ //! \function void DebugSession::open ( int minLevel, int maxLevel ); //! \param minLevel minimum debug/tracelevel (>=). //! \param maxLevel maximum debug/tracelevel (<). //! //! Change the current debug level to (minLevel,maxLevel). //! The previous range is stacked and will be restored when this //! session will be closed. //! \function void DebugSession::open ( const void* symbol, int minLevel, int maxLevel ); //! \param symbol symbol to match. //! \param minLevel minimum debug/tracelevel (>=). //! \param maxLevel maximum debug/tracelevel (<). //! //! Change the current debug level to (minLevel,maxLevel) only if //! \c symbol is traced. If the \c symbol is traced, then the new levels pair //! is stacked, otherwise the current level are stacked (we duplicate the //! top of the stack). This session, successful or not, must be closed as //! any other. //! \function void DebugSession::close (); //! Close a DebugSession and restore the previous trace levels. //! \function bool DebugSession::isTraced ( const void* symbol ); //! \Returns \true if the \c symbol is in the DebugSession symbol table. //! \function void DebugSession::addToTrace ( const void* symbol ); //! Adds the \c symbol to the table of traced symbols. //! \function void DebugSession::addToTrace ( const Cell* cell, const Name& name ); //! Adds the Net \c name from \c Cell to the table of traced symbols. } // Hurricane namespace.