| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# IssueLogger.h

Go to the documentation of this file.

    00001 #ifndef GAUDISVC_ISSUELOGGER_H
    00002 #define GAUDISVC_ISSUELOGGER_H
    00003
    00004 #include "GaudiKernel/Service.h"
    00005 #include "GaudiKernel/IIssueLogger.h"
    00006 #include "GaudiKernel/IssueSeverity.h"
    00007 #include "GaudiKernel/Property.h"
    00008 #include "StreamLogger.h"
    00009 #include "boost/function.hpp"
    00010 #include <string>
    00011 #include <vector>
    00012 #include <map>
    00013
    00014 // Forward declarations
    00015 template <class TYPE> class SvcFactory;
    00016
    00017 class IssueLogger: public Service, virtual public IIssueLogger {
    00018
    00019 public:
    00020   friend class SvcFactory<IssueLogger>;
    00021
    00022   virtual StatusCode initialize();
    00023   virtual StatusCode reinitialize();
    00024   virtual StatusCode finalize();
    00025
    00026   // Query the interfaces.
    00027   virtual StatusCode queryInterface( const InterfaceID& riid,
    00028                                      void** ppvInterface );
    00029
    00030   IssueLogger(const std::string& name, ISvcLocator *svc );
    00031
    00032   void report(IssueSeverity::Level level, const std::string& msg,
    00033               const std::string& origin);
    00034   void report(const IssueSeverity& err);
    00035
    00036
    00037 protected:
    00038
    00039   virtual ~IssueLogger();
    00040
    00041 private:
    00042
    00043   StringArrayProperty m_outputfile;
    00044   StringProperty m_reportLevelS, m_traceLevelS;
    00045   BooleanProperty m_showTime;
    00046
    00047   IssueSeverity::Level m_reportLevel, m_traceLevel;
    00048
    00049   StreamLogger *m_logger[IssueSeverity::NUM_LEVELS];
    00050   boost::function<void (const std::string&)> m_log[IssueSeverity::NUM_LEVELS];
    00051
    00052   std::map<MSG::Level, IssueSeverity::Level> m_msgSevMap;
    00053   std::map<IssueSeverity::Level, MSG::Level> m_sevMsgMap;
    00054   std::map<IssueSeverity::Level, std::string> m_levelTrans;
    00055   std::map<std::string, IssueSeverity::Level> m_levelSTrans;
    00056
    00057
    00058   StatusCode connect( const std::string& );
    00059   void getTraceBack(std::string& stack);
    00060
    00061   MSG::Level sevToMsg(IssueSeverity::Level &lev);
    00062   IssueSeverity::Level msgToSev(MSG::Level &lev);
    00063
    00064   void setupDefaultLogger();
    00065   void setupLevels(Property& prop);
    00066   void setupStreams(Property& prop);
    00067
    00068 };
    00069
    00070
    00071
    00072 #endif