Ignore:
Timestamp:
10/11/10 16:10:10 (14 years ago)
Author:
hozdoba
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XMLIO_V2/dev/dev_rv/src/XMLIO/logger.hpp

    r122 r128  
    1818      private : 
    1919 
    20          ILogger() 
     20         ILogger(void) 
    2121         { signal(SIGSEGV, SigHandler); } 
     22 
     23      private : /* static */ 
    2224 
    2325         static ILogger LOGGER; 
    2426 
    25       public : 
     27      public : /* static */ 
    2628 
    2729         static ILogger& GetLogger(void) { return (ILogger::LOGGER); } 
     30 
     31         static void Flush(std::ostream& out = std::clog) 
     32         { ILogger::GetLogger().flush(out); } 
    2833 
    2934         static void ShowBTrace(std::ostream& out = std::clog) 
     
    6368         } 
    6469 
    65          ~ILogger(void) 
    66          { std::cout << str() << std::endl; } 
     70      public : 
     71 
     72         void flush(std::ostream& out = std::clog) 
     73         { out << str() << std::endl; str(""); } 
     74 
     75         ~ILogger(void) { this->flush(); } 
    6776 
    6877   }; // class XMLIOLogger 
     
    8493 
    8594   std::ostream& IncIndent(std::ostream& out) { Indent++; return (NIndent(out)); } 
    86    std::ostream& DecEndl(std::ostream& out) { Indent--; return (out); } 
     95   std::ostream& DecEndl  (std::ostream& out) { Indent--; return (out); } 
    8796   ///////////////////////////////////////////////////////////////////// 
    8897 
    8998} // namespace XMLIOSERVER 
    9099 
    91 #define   ERROR(MSG)   (ILogger::GetLogger() << __FILE__ << ":" << __LINE__ << ": error : "   << MSG << std::endl) 
    92 #define   WARNING(MSG) (ILogger::GetLogger() << __FILE__ << ":" << __LINE__ << ": warning : " << MSG << std::endl) 
    93 #define   INFO(MSG)    (ILogger::GetLogger() << __FILE__ << ":" << __LINE__ << ": info : "    << MSG << std::endl) 
     100#define   ERROR(MSG)\ 
     101   (ILogger::GetLogger() << __FILE__ << ":" << __LINE__ << ": error : "   << MSG << std::endl) 
     102#define   WARNING(MSG)\ 
     103   (ILogger::GetLogger() << __FILE__ << ":" << __LINE__ << ": warning : " << MSG << std::endl) 
     104#define   INFO(MSG)\ 
     105   (ILogger::GetLogger() << __FILE__ << ":" << __LINE__ << ": info : "    << MSG << std::endl) 
    94106// A compléter. 
    95107 
Note: See TracChangeset for help on using the changeset viewer.