# class DebugEnabler

A holder for a debug level. More...

Full name | `TelEngine::DebugEnabler`
Definition | `#include <yateclass.h>`
Inherited by | Channel, ClientChannel, ClientDriver, Driver, Module, Plugin
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 Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.