FEI Version of the Day
fei_LogManager.hpp
00001 /*--------------------------------------------------------------------*/
00002 /*    Copyright 2005 Sandia Corporation.                              */
00003 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00004 /*    non-exclusive license for use of this work by or on behalf      */
00005 /*    of the U.S. Government.  Export of this program may require     */
00006 /*    a license from the United States Government.                    */
00007 /*--------------------------------------------------------------------*/
00008 
00009 #ifndef _fei_LogManager_hpp_
00010 #define _fei_LogManager_hpp_
00011 
00012 #include <fei_fwd.hpp>
00013 
00014 #include <string>
00015 #include <vector>
00016 
00017 namespace fei {
00018 
00022 class LogManager {
00023  public:
00025   virtual ~LogManager();
00026 
00031   static LogManager& getLogManager();
00032 
00035   OutputLevel getOutputLevel();
00036 
00039   void setOutputLevel(OutputLevel olevel);
00040 
00044   void setOutputLevel(const char* olevel);
00045 
00047   void setOutputPath(const std::string& opath);
00048 
00051   const std::string& getOutputPath();
00052 
00055   void setNumProcs(int nprocs, int localproc);
00056 
00060   void registerLogger(Logger* logger);
00061 
00064   void removeLogger(Logger* logger);
00065 
00066  private:
00068   LogManager();
00069 
00070   OutputLevel output_level_;
00071   std::string output_path_;
00072   int numProcs_;
00073   int localProc_;
00074   std::vector<fei::Logger*> loggers_;
00075 }; //class LogManager
00076 }//namespace fei
00077 #endif
00078 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends