# class DebugEnabler | A holder for a debug level. More...
Full name | `TelEngine::DebugEnabler`
Definition | `#include <yateclass.h>`
Inherited by | AnalogLineGroup, ChanAssistList, Channel, ClientChannel, ClientDriver, Driver, ETSIModem, ExpEvaluator, GTT, IAXEngine, ISDNIUA, ISDNIUAClient, ISDNLayer2, ISDNLayer3, ISDNQ921, ISDNQ921, ISDNQ921Management, ISDNQ921Management, ISDNQ921Management, ISDNQ921Passive, ISDNQ921Passive, ISDNQ931, ISDNQ931Monitor, JBClientEngine, JBClientStream, JBClusterStream, JBEngine, JBServerEngine, JBServerStream, JBStream, JGEngine, MGCPEngine, Module, Plugin, SCCP, SCCPManagement, SCCPUser, SDPParser, SIGAdaptClient, SIGAdaptServer, SIGAdaptation, SIGTransport, SIPEngine, SS7AnsiSccpManagement, SS7BICC, SS7ISUP, SS7ItuSccpManagement, SS7L2User, SS7L3User, SS7Layer2, SS7Layer3, SS7Layer4, SS7M2PA, SS7M2UA, SS7M2UAClient, SS7M3UA, SS7MTP2, SS7MTP2, SS7MTP3, SS7MTP3, SS7Management, SS7Router, SS7Router, SS7SCCP, SS7SCCP, SS7SUA, SS7TCAP, SS7TCAPANSI, SS7TCAPITU, SS7TUP, SS7Testing, SignallingCircuitGroup, SignallingCircuitSpan, SignallingComponent, SignallingEngine, SignallingInterface, SignallingReceiver, TCAPUser, UART, XmlDomParser, XmlSaxParser
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- inline DebugEnabler (int level = TelEngine::debugLevel(), bool enabled = true)
- inline ~DebugEnabler ()
- inline int debugLevel () const
- int debugLevel (int level)
- inline bool debugEnabled () const
- inline void debugEnabled (bool enable)
- inline const char* debugName () const
- bool debugAt (int level) const
- inline bool debugChained () const
- inline void debugChain (const DebugEnabler* chain = 0)
- void debugCopy (const DebugEnabler* original = 0)

#### Protected Methods

- inline void debugName (const char* name)

## Detailed Description

Holds a local debugging level that can be modified separately from the global debugging

inline DebugEnabler (int level = TelEngine::debugLevel(), bool enabled = true) | ### DebugEnabler

Constructor

Parameters:

level | The initial local debug level
enabled | Enable debugging on this object

inline ~DebugEnabler () | ### ~DebugEnabler

inline int debugLevel () | ### debugLevel

[const]

Retrieve the current local debug level

Returns: The current local debug level

int debugLevel (int level) | ### debugLevel

Set the current local debug level.

Parameters:

level | The desired debug level

Returns: The new debug level (may be different)

inline bool debugEnabled () | ### debugEnabled

[const]

Retrieve the current debug activation status

Returns: True if local debugging is enabled

inline void debugEnabled (bool enable) | ### debugEnabled

Set the current debug activation status

Parameters:

enable | The new debug activation status, true to enable

inline const char* debugName () | ### debugName

[const]

Get the current debug name

Returns: Name of the debug activation if set or NULL

bool debugAt (int level) | ### debugAt

[const]

Check if debugging output should be generated

Parameters:

level | The debug level we are testing

Returns: True if messages should be output, false otherwise

inline bool debugChained () | ### debugChained

[const]

Check if this enabler is chained to another one

Returns: True if local debugging is chained to other enabler

inline void debugChain (const DebugEnabler* chain = 0) | ### debugChain

Chain this debug holder to a parent or detach from existing one

Parameters:

chain | Pointer to parent debug level, NULL to detach

void debugCopy (const DebugEnabler* original = 0) | ### debugCopy

Copy debug settings from another object or from engine globals

Parameters:

original | Pointer to a DebugEnabler to copy settings from

inline void debugName (const char* name) | ### debugName

[protected]

Set the current debug name

Parameters:

name | Static debug name or NULL

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.