| 1 | /********************************************************************** | 
|---|
| 2 | * logOn | 
|---|
| 3 | * | 
|---|
| 4 | * | 
|---|
| 5 | * This code was created by Peter Harvey (mostly during Christmas 98/99). | 
|---|
| 6 | * This code is LGPL. Please ensure that this message remains in future | 
|---|
| 7 | * distributions and uses of this code (thats about all I get out of it). | 
|---|
| 8 | * - Peter Harvey pharvey@codebydesign.com | 
|---|
| 9 | * | 
|---|
| 10 | **********************************************************************/ | 
|---|
| 11 |  | 
|---|
| 12 | #include <config.h> | 
|---|
| 13 | #include "log.h" | 
|---|
| 14 |  | 
|---|
| 15 | /*! | 
|---|
| 16 | * \brief   Turn logging on/off. | 
|---|
| 17 | * | 
|---|
| 18 | *          Logging is turned OFF by default. Turn it on when you want | 
|---|
| 19 | *          logged messages to be stored. Turn it back off when you want to | 
|---|
| 20 | *          'pause' logging. | 
|---|
| 21 | * | 
|---|
| 22 | *          This may be used during debugging sessions to reduce clutter | 
|---|
| 23 | *          in the log results. | 
|---|
| 24 | * | 
|---|
| 25 | * \param   hLog | 
|---|
| 26 | * \param   bOn | 
|---|
| 27 | * | 
|---|
| 28 | * \return  int | 
|---|
| 29 | * \retval  LOG_SUCCESS | 
|---|
| 30 | * | 
|---|
| 31 | * \sa      logOpen | 
|---|
| 32 | *          logClose | 
|---|
| 33 | */ | 
|---|
| 34 | int logOn( HLOG hLog, int bOn ) | 
|---|
| 35 | { | 
|---|
| 36 | /* log must be logOpen to logOn */ | 
|---|
| 37 | if ( !hLog ) return LOG_ERROR; | 
|---|
| 38 |  | 
|---|
| 39 | hLog->bOn = bOn; | 
|---|
| 40 |  | 
|---|
| 41 | return LOG_SUCCESS; | 
|---|
| 42 | } | 
|---|
| 43 |  | 
|---|
| 44 |  | 
|---|
| 45 |  | 
|---|