| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

# 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 extends1<Service, IIssueLogger> {
    00018
    00019 public:
    00020   friend class SvcFactory<IssueLogger>;
    00021
    00022   virtual StatusCode initialize();
    00023   virtual StatusCode reinitialize();
    00024   virtual StatusCode finalize();
    00025
    00026   IssueLogger(const std::string& name, ISvcLocator *svc );
    00027
    00028   void report(IssueSeverity::Level level, const std::string& msg,
    00029               const std::string& origin);
    00030   void report(const IssueSeverity& err);
    00031
    00032
    00033 protected:
    00034
    00035   virtual ~IssueLogger();
    00036
    00037 private:
    00038
    00039   StringArrayProperty m_outputfile;
    00040   StringProperty m_reportLevelS, m_traceLevelS;
    00041   BooleanProperty m_showTime;
    00042
    00043   IssueSeverity::Level m_reportLevel, m_traceLevel;
    00044
    00045   StreamLogger *m_logger[IssueSeverity::NUM_LEVELS];
    00046   boost::function<void (const std::string&)> m_log[IssueSeverity::NUM_LEVELS];
    00047
    00048   std::map<MSG::Level, IssueSeverity::Level> m_msgSevMap;
    00049   std::map<IssueSeverity::Level, MSG::Level> m_sevMsgMap;
    00050   std::map<IssueSeverity::Level, std::string> m_levelTrans;
    00051   std::map<std::string, IssueSeverity::Level> m_levelSTrans;
    00052
    00053
    00054   StatusCode connect( const std::string& );
    00055   void getTraceBack(std::string& stack);
    00056
    00057   MSG::Level sevToMsg(IssueSeverity::Level &lev);
    00058   IssueSeverity::Level msgToSev(MSG::Level &lev);
    00059
    00060   void setupDefaultLogger();
    00061   void setupLevels(Property& prop);
    00062   void setupStreams(Property& prop);
    00063
    00064 };
    00065
    00066 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines