CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/Fireworks/Core/interface/fwLog.h

Go to the documentation of this file.
00001 #ifndef Fireworks_Core_fwLog_h
00002 #define Fireworks_Core_fwLog_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Core
00006 // Class  :     fwLog
00007 // 
00023 //
00024 // Original Author:  Chris Jones
00025 //         Created:  Tue Dec  8 23:10:04 CST 2009
00026 // $Id: fwLog.h,v 1.3 2009/12/12 20:42:29 amraktad Exp $
00027 //
00028 
00029 // system include files
00030 #include <iostream>
00031 
00032 // user include files
00033 
00034 // forward declarations
00035 namespace fwlog {
00036    enum LogLevel {
00037       kDebug,
00038       kInfo,
00039       kWarning,
00040       kError
00041    };
00042 
00043    const char* levelName(LogLevel);
00044    std::ostream& logger();
00045    void setLogger(std::ostream*);
00046    
00047    LogLevel presentLogLevel();
00048    void setPresentLogLevel(LogLevel);
00049 }
00050 
00051 #define fwLog(_level_) \
00052    (fwlog::presentLogLevel() > _level_) ? fwlog::logger() : fwlog::logger()<< fwlog::levelName(_level_)<<": "
00053 
00054 #endif