Changeset 2193


Ignore:
Timestamp:
06/18/03 11:17:22 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MLog.cc

    r2173 r2193  
    9393//
    9494//////////////////////////////////////////////////////////////////////////////
    95 
    9695#include "MLog.h"
    9796
    98 #include <stdlib.h>     // mkstempe
     97#include <stdlib.h>     // mkstemp
     98
    9999#include <fstream>
     100#include <iomanip>
     101
    100102#ifdef _REENTRANT
    101103#include <pthread.h>
    102104#endif
    103105#include <TGTextView.h>
    104 
    105 #include "MLogManip.h"
    106106
    107107ClassImp(MLog);
  • trunk/MagicSoft/Mars/mbase/MLogManip.h

    r2173 r2193  
    1414inline std::ostream &operator<<(std::ostream &lout, MLogManip u)
    1515{
    16     MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     16    MLog *log=dynamic_cast<MLog*>(lout.rdbuf());
    1717    if (log)
    1818        log->Underline();
     
    2525struct _Debug { int level; };
    2626
     27const _Debug all  = { 0 }; // use this for output in any case
     28const _Debug err  = { 1 }; // use this for fatal errors (red)
     29const _Debug warn = { 2 }; // use this for wrnings (yellow)
     30const _Debug inf  = { 3 }; // use this for informations (green)
     31const _Debug dbg  = { 4 }; // use this for debug messages (blue)
     32
    2733inline _Debug debug(int level)
    2834{
     
    3440inline std::ostream &operator<<(std::ostream &lout, _Debug d)
    3541{
    36     MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     42    MLog *log=dynamic_cast<MLog*>(lout.rdbuf());
    3743    if (log)
    3844        log->SetOutputLevel(d.level);
     
    5359inline std::ostream &operator<<(std::ostream &lout, _EnableDev e)
    5460{
    55     MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     61    MLog *log=dynamic_cast<MLog*>(lout.rdbuf());
    5662    if (log)
    5763        log->EnableOutputDevice(e.dev);
     
    7278inline std::ostream &operator<<(std::ostream &lout, _DisableDev d)
    7379{
    74     MLog *log=/*<dynamic_cast>*/(MLog*)lout.rdbuf();
     80    MLog *log=dynamic_cast<MLog*>(lout.rdbuf());
    7581    if (log)
    7682        log->EnableOutputDevice(d.dev);
     
    8288#ifndef __CINT__
    8389#define dbginf __FILE__ << " l." << dec << __LINE__ << ": "
    84 #define all    debug(0) // use this for output in any case
    85 #define err    debug(1) // use this for fatal errors (red)
    86 #define warn   debug(2) // use this for wrnings (yellow)
    87 #define inf    debug(3) // use this for informations (green)
    88 #define dbg    debug(4) // use this for debug messages (blue)
    8990#endif
    9091
Note: See TracChangeset for help on using the changeset viewer.